fredyvonvinet / ANTLR4-Plugins-for-NetBeans

NetBeans plugins for ANTLR 4 enabling to integrate ANTLR grammar files in standard NetBeans projects (ant-based or Maven-based).
9 stars 11 forks source link

Invalid error in a parser grammar containing rules with references to literal tokens defined in tokens file #18

Closed fredyvonvinet closed 7 years ago

fredyvonvinet commented 7 years ago

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.

fredyvonvinet commented 7 years ago

solved