@Override public TerminalAST dupNode() { return new TerminalAST(this); }
@Override public void stringRef(TerminalAST ref) { strings.add(ref.getText()); } @Override
@Override public void stringRef(TerminalAST ref) { strings.add(ref.getText()); } @Override
@Override public TerminalAST dupNode() { return new TerminalAST(this); }
@Override public void stringRef(TerminalAST ref) { strings.add(ref.getText()); } @Override
@Override public TerminalAST dupNode() { return new TerminalAST(this); }
@Override public void stringRef(TerminalAST ref) { strings.add(ref.getText()); } @Override
@Override public TerminalAST dupNode() { return new TerminalAST(this); }
@Override public void stringRef(TerminalAST ref) { strings.add(ref.getText()); } @Override
@Override public TerminalAST dupNode() { return new TerminalAST(this); }
@Override /** Make sure even imaginary nodes know the input stream */ public Object create(int tokenType, String text) { GrammarAST t; if ( tokenType==ANTLRParser.RULE ) { // needed by TreeWizard to make RULE tree t = new RuleAST(new CommonToken(tokenType, text)); } else if ( tokenType==ANTLRParser.STRING_LITERAL ) { // implicit lexer construction done with wizard; needs this node type // whereas grammar ANTLRParser.g can use token option to spec node type t = new TerminalAST(new CommonToken(tokenType, text)); } else { t = (GrammarAST)super.create(tokenType, text); } t.token.setInputStream(input); return t; }
@Override /** Make sure even imaginary nodes know the input stream */ public Object create(int tokenType, String text) { GrammarAST t; if ( tokenType==ANTLRParser.RULE ) { // needed by TreeWizard to make RULE tree t = new RuleAST(new CommonToken(tokenType, text)); } else if ( tokenType==ANTLRParser.STRING_LITERAL ) { // implicit lexer construction done with wizard; needs this node type // whereas grammar ANTLRParser.g can use token option to spec node type t = new TerminalAST(new CommonToken(tokenType, text)); } else { t = (GrammarAST)super.create(tokenType, text); } t.token.setInputStream(input); return t; }
@Override /** Make sure even imaginary nodes know the input stream */ public Object create(int tokenType, String text) { GrammarAST t; if ( tokenType==ANTLRParser.RULE ) { // needed by TreeWizard to make RULE tree t = new RuleAST(new CommonToken(tokenType, text)); } else if ( tokenType==ANTLRParser.STRING_LITERAL ) { // implicit lexer construction done with wizard; needs this node type // whereas grammar ANTLRParser.g can use token option to spec node type t = new TerminalAST(new CommonToken(tokenType, text)); } else { t = (GrammarAST)super.create(tokenType, text); } t.token.setInputStream(input); return t; }
@Override /** Make sure even imaginary nodes know the input stream */ public Object create(int tokenType, String text) { GrammarAST t; if ( tokenType==ANTLRParser.RULE ) { // needed by TreeWizard to make RULE tree t = new RuleAST(new CommonToken(tokenType, text)); } else if ( tokenType==ANTLRParser.STRING_LITERAL ) { // implicit lexer construction done with wizard; needs this node type // whereas grammar ANTLRParser.g can use token option to spec node type t = new TerminalAST(new CommonToken(tokenType, text)); } else { t = (GrammarAST)super.create(tokenType, text); } t.token.setInputStream(input); return t; }
@Override /** Make sure even imaginary nodes know the input stream */ public GrammarAST create(int tokenType, String text) { GrammarAST t; if ( tokenType==ANTLRParser.RULE ) { // needed by TreeWizard to make RULE tree t = new RuleAST(new CommonToken(tokenType, text)); } else if ( tokenType==ANTLRParser.STRING_LITERAL ) { // implicit lexer construction done with wizard; needs this node type // whereas grammar ANTLRParser.g can use token option to spec node type t = new TerminalAST(new CommonToken(tokenType, text)); } else { t = (GrammarAST)super.create(tokenType, text); } t.token.setInputStream(input); return t; }