5 Apr
2020
5 Apr
'20
9:52 a.m.
On 6/04/20 2:08 am, Jelle Zijlstra wrote:
The current CPython parser usually just produces "SyntaxError: invalid syntax" for any error, while other languages that I work with usually say something more precise like 'expected x, got y'. What will the error messages in the PEG parser look like? Making syntax errors more informative can be a nice improvement to usability.
And related to that, how precisely will it be able to pinpoint the location of the error? The backtracking worries me a bit in that regard. I can imagine it trying all possible ways to parse the input and then only being able to say "Something is wrong somewhere in this file." -- Greg