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
java -jar antlr-4.7-complete.jar g.g4
error(50): g.g4::: syntax error: mismatched character ':' expecting 'g'
error(50): g.g4:2:7: syntax error: ''X'' came as a complete surprise to me
Removing the space between 'tree' and ':' or changing 'tree' to other rule name helps.
I've found that 'tree' was a keyword in antlr v3. But the reference book of v4 doesn't list it any more.
If 'tree' is a reserved keyword, the error message is confusing.