Message368677
> SyntaxError: Invalid syntax. Expected one of: for, pass, lambda, False, global, True, __new_parser__, if, raise, continue, not, break, while, None, del, nonlocal, import, assert, return, class, with, def, try, from, yield
Haha, that is a good point. It also reveals the easter egg :)
> The beauty of Python's detail-free syntax error is that it doesn't tell you what it expects -- because parsers are dumb, what the parser expected is rarely what's wrong with your code -- and it requires the user to understand how the parser works to interpret the error message.
Right, I think will be very difficult to actually give you something very close to what the actual problem is.
I started this draft based on some similar errors that I have seen in other parsers but is true that with the exception of rust, all other grammars I explored and played with were mucn simpler, so the errors were not super verbose.
I think i will close the issue and the PR unless you think there is something worth exploring/discussing left, as it does not look that we can get something less verbose in an easy way. |
|
Date |
User |
Action |
Args |
2020-05-11 23:04:38 | pablogsal | set | recipients:
+ pablogsal, gvanrossum, lys.nikolaou |
2020-05-11 23:04:38 | pablogsal | set | messageid: <1589238278.35.0.286610326928.issue40599@roundup.psfhosted.org> |
2020-05-11 23:04:38 | pablogsal | link | issue40599 messages |
2020-05-11 23:04:38 | pablogsal | create | |
|