public final void declaration() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST declaration_AST = null; AST m_AST = null; AST t_AST = null; AST v_AST = null; modifiers(); m_AST = (AST)returnAST; typeSpec(false); t_AST = (AST)returnAST; variableDefinitions(m_AST,t_AST); v_AST = (AST)returnAST; if ( inputState.guessing==0 ) { declaration_AST = (AST)currentAST.root; declaration_AST = v_AST; currentAST.root = declaration_AST; currentAST.child = declaration_AST!=null &&declaration_AST.getFirstChild()!=null ? declaration_AST.getFirstChild() : declaration_AST; currentAST.advanceChildToEnd(); } returnAST = declaration_AST; }
public final void compoundStatement() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST compoundStatement_AST = null; openBlock(); astFactory.addASTChild(currentAST, returnAST); compoundStatement_AST = (AST)currentAST.root; returnAST = compoundStatement_AST; }
public final void closableBlockConstructorExpression() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST closableBlockConstructorExpression_AST = null; closableBlock(); astFactory.addASTChild(currentAST, returnAST); closableBlockConstructorExpression_AST = (AST)currentAST.root; returnAST = closableBlockConstructorExpression_AST; }
/** A block known to be a closure, but which omits its arguments, is given this placeholder. * A subsequent pass is responsible for deciding if there is an implicit 'it' parameter, * or if the parameter list should be empty. */ public final void implicitParameters() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST implicitParameters_AST = null; Token first = LT(1); if ( inputState.guessing==0 ) { implicitParameters_AST = (AST)currentAST.root; implicitParameters_AST = (AST)astFactory.make( (new ASTArray(1)).add(create(IMPLICIT_PARAMETERS,"IMPLICIT_PARAMETERS",first,LT(1)))); currentAST.root = implicitParameters_AST; currentAST.child = implicitParameters_AST!=null &&implicitParameters_AST.getFirstChild()!=null ? implicitParameters_AST.getFirstChild() : implicitParameters_AST; currentAST.advanceChildToEnd(); } implicitParameters_AST = (AST)currentAST.root; returnAST = implicitParameters_AST; }
/** A Groovy script or simple expression. Can be anything legal inside {...}. */ public final void snippetUnit() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST snippetUnit_AST = null; nls(); blockBody(EOF); astFactory.addASTChild(currentAST, returnAST); snippetUnit_AST = (AST)currentAST.root; returnAST = snippetUnit_AST; }
public final void genericMethod() throws RecognitionException, TokenStreamException { ASTPair currentAST = new ASTPair(); AST genericMethod_AST = null; AST m_AST = null; currentAST.child = genericMethod_AST!=null &&genericMethod_AST.getFirstChild()!=null ? genericMethod_AST.getFirstChild() : genericMethod_AST; currentAST.advanceChildToEnd();
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; }
public final void expression() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST expression_AST = null; Token first = LT(1); assignmentExpression(); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { expression_AST = (AST)currentAST.root; expression_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXPR,"EXPR",first,LT(1))).add(expression_AST)); currentAST.root = expression_AST; currentAST.child = expression_AST!=null &&expression_AST.getFirstChild()!=null ? expression_AST.getFirstChild() : expression_AST; currentAST.advanceChildToEnd(); } expression_AST = (AST)currentAST.root; returnAST = expression_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 list of one or more modifier, annotation, or "def". */ public final void modifiers() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST modifiers_AST = null; Token first = LT(1); modifiersInternal(); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { modifiers_AST = (AST)currentAST.root; modifiers_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(MODIFIERS,"MODIFIERS",first,LT(1))).add(modifiers_AST)); currentAST.root = modifiers_AST; currentAST.child = modifiers_AST!=null &&modifiers_AST.getFirstChild()!=null ? modifiers_AST.getFirstChild() : modifiers_AST; currentAST.advanceChildToEnd(); } modifiers_AST = (AST)currentAST.root; returnAST = modifiers_AST; }
public final void finallyClause() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST finallyClause_AST = null; AST tmp188_AST = null; tmp188_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp188_AST); match(LITERAL_finally); compoundStatement(); astFactory.addASTChild(currentAST, returnAST); finallyClause_AST = (AST)currentAST.root; returnAST = finallyClause_AST; }
public final void assignmentLessExpression() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST assignmentLessExpression_AST = null; Token first = LT(1); { conditionalExpression(0); astFactory.addASTChild(currentAST, returnAST); } if ( inputState.guessing==0 ) { assignmentLessExpression_AST = (AST)currentAST.root; assignmentLessExpression_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(EXPR,"EXPR",first,LT(1))).add(assignmentLessExpression_AST)); currentAST.root = assignmentLessExpression_AST; currentAST.child = assignmentLessExpression_AST!=null &&assignmentLessExpression_AST.getFirstChild()!=null ? assignmentLessExpression_AST.getFirstChild() : assignmentLessExpression_AST; currentAST.advanceChildToEnd(); } assignmentLessExpression_AST = (AST)currentAST.root; returnAST = assignmentLessExpression_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; }
public final void annotations() throws RecognitionException, TokenStreamException { ASTPair currentAST = new ASTPair(); AST annotations_AST = null; Token first = LT(1); currentAST.child = annotations_AST!=null &&annotations_AST.getFirstChild()!=null ? annotations_AST.getFirstChild() : annotations_AST; currentAST.advanceChildToEnd();
/** 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 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; }
public final void anntotationMemberValuePairs() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST anntotationMemberValuePairs_AST = null; annotationMemberValuePair(); astFactory.addASTChild(currentAST, returnAST); { _loop67: do { if ((LA(1)==COMMA)) { match(COMMA); annotationMemberValuePair(); astFactory.addASTChild(currentAST, returnAST); } else { break _loop67; } } while (true); } anntotationMemberValuePairs_AST = (AST)currentAST.root; returnAST = anntotationMemberValuePairs_AST; }
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 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; }
public final void classTypeSpec( boolean addImagNode ) throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST classTypeSpec_AST = null; AST ct_AST = null; Token first = LT(1); classOrInterfaceType(false); ct_AST = (AST)returnAST; declaratorBrackets(ct_AST); astFactory.addASTChild(currentAST, returnAST); if ( inputState.guessing==0 ) { classTypeSpec_AST = (AST)currentAST.root; if ( addImagNode ) { classTypeSpec_AST = (AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(classTypeSpec_AST)); } currentAST.root = classTypeSpec_AST; currentAST.child = classTypeSpec_AST!=null &&classTypeSpec_AST.getFirstChild()!=null ? classTypeSpec_AST.getFirstChild() : classTypeSpec_AST; currentAST.advanceChildToEnd(); } classTypeSpec_AST = (AST)currentAST.root; returnAST = classTypeSpec_AST; }