@Override public RuleAST dupNode() { return new RuleAST(this); }
@Override public RuleAST dupNode() { return new RuleAST(this); }
@Override public RuleAST dupNode() { return new RuleAST(this); }
@Override public RuleAST dupNode() { return new RuleAST(this); }
@Override public RuleAST dupNode() { return new RuleAST(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; }
GrammarAST litRule = new RuleAST(ANTLRParser.RULE); BlockAST blk = new BlockAST(ANTLRParser.BLOCK); AltAST alt = new AltAST(ANTLRParser.ALT);
GrammarAST litRule = new RuleAST(ANTLRParser.RULE); BlockAST blk = new BlockAST(ANTLRParser.BLOCK); AltAST alt = new AltAST(ANTLRParser.ALT);
GrammarAST litRule = new RuleAST(ANTLRParser.RULE); BlockAST blk = new BlockAST(ANTLRParser.BLOCK); AltAST alt = new AltAST(ANTLRParser.ALT);
GrammarAST litRule = new RuleAST(ANTLRParser.RULE); BlockAST blk = new BlockAST(ANTLRParser.BLOCK); AltAST alt = new AltAST(ANTLRParser.ALT);
root_1 = (GrammarAST)adaptor.becomeRoot(new RuleAST(RULE), root_1); adaptor.addChild(root_1, stream_TOKEN_REF.nextNode());
root_1 = (GrammarAST)adaptor.becomeRoot(new RuleAST(RULE), root_1); adaptor.addChild(root_1, stream_TOKEN_REF.nextNode());
root_1 = (GrammarAST)adaptor.becomeRoot(new RuleAST(RULE), root_1); adaptor.addChild(root_1, stream_TOKEN_REF.nextNode());
root_1 = (GrammarAST)adaptor.becomeRoot(new RuleAST(RULE), root_1); adaptor.addChild(root_1, stream_TOKEN_REF.nextNode());
root_1 = (GrammarAST)adaptor.becomeRoot(new RuleAST(RULE), root_1); adaptor.addChild(root_1, stream_TOKEN_REF.nextNode());
root_1 = (GrammarAST)adaptor.becomeRoot(new RuleAST(RULE), root_1); adaptor.addChild(root_1, stream_RULE_REF.nextNode());