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 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 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; }
/** 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; }
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; }
/** 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 traditionalForClause() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST traditionalForClause_AST = null; forInit(); astFactory.addASTChild(currentAST, returnAST); match(SEMI); forCond(); astFactory.addASTChild(currentAST, returnAST); match(SEMI); forIter(); astFactory.addASTChild(currentAST, returnAST); traditionalForClause_AST = (AST)currentAST.root; returnAST = traditionalForClause_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; }
/** 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; }
/** 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; }
public final void typeArgumentsOrDiamond() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST typeArgumentsOrDiamond_AST = null; if ((LA(1)==LT) && (LA(2)==GT)) { match(LT); match(GT); typeArgumentsOrDiamond_AST = (AST)currentAST.root; } else if ((LA(1)==LT) && (_tokenSet_5.member(LA(2)))) { typeArguments(); astFactory.addASTChild(currentAST, returnAST); typeArgumentsOrDiamond_AST = (AST)currentAST.root; } else { throw new NoViableAltException(LT(1), getFilename()); } returnAST = typeArgumentsOrDiamond_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; }
/** 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 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; }
public final void annotationArguments() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST annotationArguments_AST = null; if ((_tokenSet_9.member(LA(1))) && (_tokenSet_10.member(LA(2)))) { annotationMemberValueInitializer(); astFactory.addASTChild(currentAST, returnAST); annotationArguments_AST = (AST)currentAST.root; } else if ((LA(1)==IDENT) && (LA(2)==ASSIGN)) { anntotationMemberValuePairs(); astFactory.addASTChild(currentAST, returnAST); annotationArguments_AST = (AST)currentAST.root; } else { throw new NoViableAltException(LT(1), getFilename()); } returnAST = annotationArguments_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 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; }
/** Used in cases where a declaration cannot have commas, or ends with the "in" operator instead of '='. */ public final void singleVariable( AST mods, AST t ) throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST singleVariable_AST = null; AST id_AST = null; Token first = LT(1); variableName(); id_AST = (AST)returnAST; if ( inputState.guessing==0 ) { singleVariable_AST = (AST)currentAST.root; singleVariable_AST = (AST)astFactory.make( (new ASTArray(4)).add(create(VARIABLE_DEF,"VARIABLE_DEF",first,LT(1))).add(mods).add((AST)astFactory.make( (new ASTArray(2)).add(create(TYPE,"TYPE",first,LT(1))).add(t))).add(id_AST)); currentAST.root = singleVariable_AST; currentAST.child = singleVariable_AST!=null &&singleVariable_AST.getFirstChild()!=null ? singleVariable_AST.getFirstChild() : singleVariable_AST; currentAST.advanceChildToEnd(); } returnAST = singleVariable_AST; }