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.
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
orsyntax 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 asat line {} column {}
. Let's make the error messages consistent.