It is forbidden to implicitly define new tokens in a parser grammar.
Most of the time, we reference token through their name, but it is valid to refrence them through their value that is their literal. If in a parser grammar we do that for tokens defined in tokens file (generated by a lexer grammar or edited by hand), we obtain an error that is not valid.
It is forbidden to implicitly define new tokens in a parser grammar.
Most of the time, we reference token through their name, but it is valid to refrence them through their value that is their literal. If in a parser grammar we do that for tokens defined in tokens file (generated by a lexer grammar or edited by hand), we obtain an error that is not valid.