Fix support for the special token reference `EOF`

This commit is contained in:
Sam Harwell 2012-11-18 18:13:49 -06:00
parent d6e1ca2b61
commit e610f26998
1 changed files with 5 additions and 0 deletions

View File

@ -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);
}