Fix token definitions: tokens in a tokens{...} block now have type TOKEN_REF (was ID before commit 38214f6312)

This commit is contained in:
Sam Harwell 2012-11-18 18:02:10 -06:00
parent 178df68183
commit 16ace4b429
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ public class SemanticPipeline {
void assignLexerTokenTypes(Grammar g, List<GrammarAST> tokensDefs) {
Grammar G = g.getOutermostGrammar(); // put in root, even if imported
for (GrammarAST def : tokensDefs) {
if ( def.getType()== ANTLRParser.ID ) G.defineTokenName(def.getText());
if ( def.getType()== ANTLRParser.TOKEN_REF ) G.defineTokenName(def.getText());
}
/* Define token types for nonfragment rules which do not include a 'type(...)'