Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make location information in errors consistent #19

Open
umut-sahin opened this issue Nov 10, 2024 · 0 comments
Open

Make location information in errors consistent #19

umut-sahin opened this issue Nov 10, 2024 · 0 comments

Comments

@umut-sahin
Copy link
Owner

We have

  • GrammarError for failing to create the grammar object from its string representation (e.g., grammar error: invalid regex /[1-9][0-9+/ at line 3 column 8)
  • ParserError for failing to create the parser for the grammar (e.g., lalr parser error: conflict at state 5 on '+')
  • ParsingError for failing to parse the input (e.g., tokenization error: unknown token a at 1:3 or syntax error: unexpected token x at 1:3 (expected one of 'y', 'z'))

Some errors print the location of the error as at {}:{} and others print it as at line {} column {}. Let's make the error messages consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant