public final void variableName() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST variableName_AST = null; AST tmp217_AST = null; tmp217_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp217_AST); match(IDENT); variableName_AST = (AST)currentAST.root; returnAST = variableName_AST; }
/** Used to look ahead for a constructor */ public final void constructorStart() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST constructorStart_AST = null; Token id = null; AST id_AST = null; modifiersOpt(); id = LT(1); id_AST = astFactory.create(id); match(IDENT); if (!(isConstructorIdent(id))) throw new SemanticException("isConstructorIdent(id)"); nls(); match(LPAREN); returnAST = constructorStart_AST; }
/** Lookahead to check whether a block begins with explicit closure arguments. */ public final void closableBlockParamsStart() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST closableBlockParamsStart_AST = null; nls(); parameterDeclarationList(); nls(); AST tmp225_AST = null; tmp225_AST = astFactory.create(LT(1)); match(CLOSABLE_BLOCK_OP); returnAST = closableBlockParamsStart_AST; }
/** A labeled statement, consisting of a vanilla identifier followed by a colon. */ public final void statementLabelPrefix() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST statementLabelPrefix_AST = null; Token c = null; AST c_AST = null; AST tmp230_AST = null; tmp230_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp230_AST); match(IDENT); c = LT(1); c_AST = astFactory.create(c); astFactory.makeASTRoot(currentAST, c_AST); match(COLON); if ( inputState.guessing==0 ) { c_AST.setType(LABELED_STAT); } nls(); statementLabelPrefix_AST = (AST)currentAST.root; returnAST = statementLabelPrefix_AST; }
public final void handler() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST handler_AST = null; AST pd_AST = null; AST handlerCs_AST = null; Token first = LT(1); match(LITERAL_catch); match(LPAREN); multicatch(); pd_AST = (AST)returnAST; match(RPAREN); nlsWarn(); compoundStatement(); handlerCs_AST = (AST)returnAST; if ( inputState.guessing==0 ) { handler_AST = (AST)currentAST.root; handler_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(LITERAL_catch,"catch",first,LT(1))).add(pd_AST).add(handlerCs_AST)); currentAST.root = handler_AST; currentAST.child = handler_AST!=null &&handler_AST.getFirstChild()!=null ? handler_AST.getFirstChild() : handler_AST; currentAST.advanceChildToEnd(); } handler_AST = (AST)currentAST.root; returnAST = handler_AST; }
public final void typeArgumentsDiamond() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST typeArgumentsDiamond_AST = null; Token first = LT(1); match(LT); match(GT); nls(); if ( inputState.guessing==0 ) { typeArgumentsDiamond_AST = (AST)currentAST.root; typeArgumentsDiamond_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE_ARGUMENTS,"TYPE_ARGUMENTS",first,LT(1))).add(typeArgumentsDiamond_AST)); currentAST.root = typeArgumentsDiamond_AST; currentAST.child = typeArgumentsDiamond_AST!=null &&typeArgumentsDiamond_AST.getFirstChild()!=null ? typeArgumentsDiamond_AST.getFirstChild() : typeArgumentsDiamond_AST; currentAST.advanceChildToEnd(); } typeArgumentsDiamond_AST = (AST)currentAST.root; returnAST = typeArgumentsDiamond_AST; }
/** An IDENT token whose spelling is required to start with an uppercase letter. * In the case of a simple statement {UpperID name} the identifier is taken to be a type name, not a command name. */ public final void upperCaseIdent() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST upperCaseIdent_AST = null; if (!(isUpperCase(LT(1)))) throw new SemanticException("isUpperCase(LT(1))"); AST tmp64_AST = null; tmp64_AST = astFactory.create(LT(1)); astFactory.addASTChild(currentAST, tmp64_AST); match(IDENT); upperCaseIdent_AST = (AST)currentAST.root; returnAST = upperCaseIdent_AST; }
/** An assignment operator '=' followed by an expression. (Never empty.) */ public final void varInitializer() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST varInitializer_AST = null; AST tmp43_AST = null; tmp43_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp43_AST); match(ASSIGN); nls(); expressionStatementNoCheck(); astFactory.addASTChild(currentAST, returnAST); varInitializer_AST = (AST)currentAST.root; returnAST = varInitializer_AST; }
public final void balancedTokens() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST balancedTokens_AST = null; { _loop591: do { if ((_tokenSet_41.member(LA(1)))) { balancedBrackets(); } else if ((_tokenSet_42.member(LA(1)))) { { match(_tokenSet_42); } } else { break _loop591; } } while (true); } returnAST = balancedTokens_AST; }
/** An open block is not allowed to have closure arguments. */ public final void openBlock() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST openBlock_AST = null; AST bb_AST = null; Token first = LT(1); match(LCURLY); nls(); blockBody(EOF); bb_AST = (AST)returnAST; match(RCURLY); if ( inputState.guessing==0 ) { openBlock_AST = (AST)currentAST.root; openBlock_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(SLIST,"{",first,LT(1))).add(bb_AST)); currentAST.root = openBlock_AST; currentAST.child = openBlock_AST!=null &&openBlock_AST.getFirstChild()!=null ? openBlock_AST.getFirstChild() : openBlock_AST; currentAST.advanceChildToEnd(); } openBlock_AST = (AST)currentAST.root; returnAST = openBlock_AST; }
public final void annotationMemberValuePairs() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST annotationMemberValuePairs_AST = null; annotationMemberValuePair(); astFactory.addASTChild(currentAST, returnAST); { _loop95: do { if ((LA(1)==COMMA)) { match(COMMA); nls(); annotationMemberValuePair(); astFactory.addASTChild(currentAST, returnAST); } else { break _loop95; } } while (true); } annotationMemberValuePairs_AST = (AST)currentAST.root; returnAST = annotationMemberValuePairs_AST; }
/** Zero or more insignificant newlines, all gobbled up and thrown away. */ public final void nls() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST nls_AST = null; { if ((LA(1)==NLS) && (_tokenSet_2.member(LA(2)))) { match(NLS); } else if ((_tokenSet_2.member(LA(1))) && (_tokenSet_3.member(LA(2)))) { } else { throw new NoViableAltException(LT(1), getFilename()); } } returnAST = nls_AST; }
tmp289_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp289_AST); match(BAND); nls(); regexExpression(0);
tmp325_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp325_AST); match(STAR_STAR); nls(); unaryExpression(0);
public final void finallyClause() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST finallyClause_AST = null; AST finallyCs_AST = null; Token first = LT(1); match(LITERAL_finally); nlsWarn(); compoundStatement(); finallyCs_AST = (AST)returnAST; if ( inputState.guessing==0 ) { finallyClause_AST = (AST)currentAST.root; finallyClause_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(LITERAL_finally,"finally",first,LT(1))).add(finallyCs_AST)); currentAST.root = finallyClause_AST; currentAST.child = finallyClause_AST!=null &&finallyClause_AST.getFirstChild()!=null ? finallyClause_AST.getFirstChild() : finallyClause_AST; currentAST.advanceChildToEnd(); } finallyClause_AST = (AST)currentAST.root; returnAST = finallyClause_AST; }
public final void packageDefinition() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST packageDefinition_AST = null; AST an_AST = null; AST id_AST = null; Token first = LT(1); annotationsOpt(); an_AST = (AST)returnAST; match(LITERAL_package); identifier(); id_AST = (AST)returnAST; if ( inputState.guessing==0 ) { packageDefinition_AST = (AST)currentAST.root; packageDefinition_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(PACKAGE_DEF,"package",first,LT(1))).add(an_AST).add(id_AST)); currentAST.root = packageDefinition_AST; currentAST.child = packageDefinition_AST!=null &&packageDefinition_AST.getFirstChild()!=null ? packageDefinition_AST.getFirstChild() : packageDefinition_AST; currentAST.advanceChildToEnd(); } packageDefinition_AST = (AST)currentAST.root; returnAST = packageDefinition_AST; }
public final void annotationMemberValuePair() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST annotationMemberValuePair_AST = null; AST i_AST = null; AST v_AST = null; Token first = LT(1); annotationIdent(); i_AST = (AST)returnAST; match(ASSIGN); nls(); annotationMemberValueInitializer(); v_AST = (AST)returnAST; if ( inputState.guessing==0 ) { annotationMemberValuePair_AST = (AST)currentAST.root; annotationMemberValuePair_AST = (AST)astFactory.make( (new ASTArray(3)).add(create(ANNOTATION_MEMBER_VALUE_PAIR,"ANNOTATION_MEMBER_VALUE_PAIR",first,LT(1))).add(i_AST).add(v_AST)); currentAST.root = annotationMemberValuePair_AST; currentAST.child = annotationMemberValuePair_AST!=null &&annotationMemberValuePair_AST.getFirstChild()!=null ? annotationMemberValuePair_AST.getFirstChild() : annotationMemberValuePair_AST; currentAST.advanceChildToEnd(); } returnAST = annotationMemberValuePair_AST; }
/** Simple names, as in {x|...}, are completely equivalent to {(def x)|...}. Build the right AST. */ public final void closableBlockParam() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST closableBlockParam_AST = null; Token id = null; AST id_AST = null; Token first = LT(1); id = LT(1); id_AST = astFactory.create(id); match(IDENT); if ( inputState.guessing==0 ) { closableBlockParam_AST = (AST)currentAST.root; closableBlockParam_AST = (AST)astFactory.make( (new ASTArray(4)).add(create(PARAMETER_DEF,"PARAMETER_DEF",first,LT(1))).add((AST)astFactory.make( (new ASTArray(1)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))))).add((AST)astFactory.make( (new ASTArray(1)).add(create(TYPE,"TYPE",first,LT(1))))).add(id_AST)); currentAST.root = closableBlockParam_AST; currentAST.child = closableBlockParam_AST!=null &&closableBlockParam_AST.getFirstChild()!=null ? closableBlockParam_AST.getFirstChild() : closableBlockParam_AST; currentAST.advanceChildToEnd(); } returnAST = closableBlockParam_AST; }