forked from jasder/antlr
Fix support for the special token reference `EOF`
This commit is contained in:
parent
d6e1ca2b61
commit
e610f26998
|
@ -463,6 +463,11 @@ public class Tool {
|
|||
public boolean undefined = false;
|
||||
@Override
|
||||
public void tokenRef(TerminalAST ref) {
|
||||
if ("EOF".equals(ref.getText())) {
|
||||
// this is a special predefined reference
|
||||
return;
|
||||
}
|
||||
|
||||
if ( g.isLexer() ) ruleRef(ref, null);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue