You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and I get confused because group should be a valid next token in my grammar. However, it turns out that group is a Keyword token in my lexer, not an Identifier token like I wanted. Upon realizing that the token was of the wrong type, the error makes sense now. However, realizing that the token type was the problem can take a while, especially if the lexer is complicated or contains overlapping rules, because the error message doesn't give any indication of the types of the tokens involved (found OR expected). I think that including the token types in the error message would help people facing this issue solve it much more quickly.
The text was updated successfully, but these errors were encountered:
I had a bit of a dig into this and unfortunately it would not be straightforward to fix this. The human-readable token names are contained in the lexer.Definition, but these errors come from locations that don't have access to that type. I don't have any good ideas for this at the moment.
Sometimes I get an unexpected parsing error like
and I get confused because
group
should be a valid next token in my grammar. However, it turns out thatgroup
is a Keyword token in my lexer, not an Identifier token like I wanted. Upon realizing that the token was of the wrong type, the error makes sense now. However, realizing that the token type was the problem can take a while, especially if the lexer is complicated or contains overlapping rules, because the error message doesn't give any indication of the types of the tokens involved (found OR expected). I think that including the token types in the error message would help people facing this issue solve it much more quickly.The text was updated successfully, but these errors were encountered: