From 062210b54a032ec2aece9931b74b3a99e1526357 Mon Sep 17 00:00:00 2001 From: sharwell Date: Thu, 17 Nov 2011 17:00:08 -0800 Subject: [PATCH] v4: check for labels that alias a token name [git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9346] --- tool/src/org/antlr/v4/semantics/SymbolChecks.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tool/src/org/antlr/v4/semantics/SymbolChecks.java b/tool/src/org/antlr/v4/semantics/SymbolChecks.java index 75591eb4f..fe2c91f26 100644 --- a/tool/src/org/antlr/v4/semantics/SymbolChecks.java +++ b/tool/src/org/antlr/v4/semantics/SymbolChecks.java @@ -57,6 +57,10 @@ public class SymbolChecks { this.g = g; this.collector = collector; this.errMgr = g.tool.errMgr; + + for (GrammarAST tokenId : collector.tokenIDRefs) { + tokenIDs.add(tokenId.getText()); + } /* System.out.println("rules="+collector.rules); System.out.println("rulerefs="+collector.rulerefs);