Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.antlr.parser
Class GroovyRecognizer

Field Summary
`boolean` | `ANTLR_LOOP_EXIT`
`int` | `LC_INIT`
`int` | `LC_STMT`
`def` | `_tokenNames`
`BitSet` | `_tokenSet_0`
`BitSet` | `_tokenSet_1`
`BitSet` | `_tokenSet_10`
`BitSet` | `_tokenSet_11`
`BitSet` | `_tokenSet_12`
`BitSet` | `_tokenSet_13`
`BitSet` | `_tokenSet_14`
`BitSet` | `_tokenSet_15`
`BitSet` | `_tokenSet_16`
`BitSet` | `_tokenSet_17`
`BitSet` | `_tokenSet_18`
`BitSet` | `_tokenSet_19`
`BitSet` | `_tokenSet_2`
`BitSet` | `_tokenSet_20`
`BitSet` | `_tokenSet_21`
`BitSet` | `_tokenSet_22`
`BitSet` | `_tokenSet_23`
`BitSet` | `_tokenSet_24`
`BitSet` | `_tokenSet_25`
`BitSet` | `_tokenSet_26`
`BitSet` | `_tokenSet_27`
`BitSet` | `_tokenSet_28`
`BitSet` | `_tokenSet_29`
`BitSet` | `_tokenSet_3`
`BitSet` | `_tokenSet_30`
`BitSet` | `_tokenSet_31`
`BitSet` | `_tokenSet_32`
`BitSet` | `_tokenSet_33`
`BitSet` | `_tokenSet_34`
`BitSet` | `_tokenSet_35`
`BitSet` | `_tokenSet_36`
`BitSet` | `_tokenSet_37`
`BitSet` | `_tokenSet_38`
`BitSet` | `_tokenSet_39`
`BitSet` | `_tokenSet_4`
`BitSet` | `_tokenSet_40`
`BitSet` | `_tokenSet_41`
`BitSet` | `_tokenSet_42`
`BitSet` | `_tokenSet_43`
`BitSet` | `_tokenSet_44`
`BitSet` | `_tokenSet_45`
`BitSet` | `_tokenSet_46`
`BitSet` | `_tokenSet_47`
`BitSet` | `_tokenSet_48`
`BitSet` | `_tokenSet_49`
`BitSet` | `_tokenSet_5`
`BitSet` | `_tokenSet_50`
`BitSet` | `_tokenSet_51`
`BitSet` | `_tokenSet_52`
`BitSet` | `_tokenSet_53`
`BitSet` | `_tokenSet_54`
`BitSet` | `_tokenSet_55`
`BitSet` | `_tokenSet_56`
`BitSet` | `_tokenSet_57`
`BitSet` | `_tokenSet_58`
`BitSet` | `_tokenSet_59`
`BitSet` | `_tokenSet_6`
`BitSet` | `_tokenSet_60`
`BitSet` | `_tokenSet_61`
`BitSet` | `_tokenSet_62`
`BitSet` | `_tokenSet_63`
`BitSet` | `_tokenSet_64`
`BitSet` | `_tokenSet_65`
`BitSet` | `_tokenSet_66`
`BitSet` | `_tokenSet_67`
`BitSet` | `_tokenSet_68`
`BitSet` | `_tokenSet_69`
`BitSet` | `_tokenSet_7`
`BitSet` | `_tokenSet_70`
`BitSet` | `_tokenSet_71`
`BitSet` | `_tokenSet_72`
`BitSet` | `_tokenSet_73`
`BitSet` | `_tokenSet_74`
`BitSet` | `_tokenSet_75`
`BitSet` | `_tokenSet_76`
`BitSet` | `_tokenSet_77`
`BitSet` | `_tokenSet_78`
`BitSet` | `_tokenSet_79`
`BitSet` | `_tokenSet_8`
`BitSet` | `_tokenSet_80`
`BitSet` | `_tokenSet_81`
`BitSet` | `_tokenSet_82`
`BitSet` | `_tokenSet_83`
`BitSet` | `_tokenSet_84`
`BitSet` | `_tokenSet_85`
`BitSet` | `_tokenSet_86`
`BitSet` | `_tokenSet_87`
`BitSet` | `_tokenSet_88`
`BitSet` | `_tokenSet_89`
`BitSet` | `_tokenSet_9`
`BitSet` | `_tokenSet_90`
`BitSet` | `_tokenSet_91`
`boolean` | `argListHasLabels`
`AST` | `currentClass`
`GroovySourceAST` | `dummyVariableToforceClassLoaderToFindASTClass`
`AST` | `lastPathExpression`
`GroovyLexer` | `lexer`
`int` | `ltCounter`
`int` | `sepToken`
`SourceBuffer` | `sourceBuffer`
`boolean` | `tracing`
`List` | `warningList`

Constructor Summary
`GroovyRecognizer(TokenBuffer tokenBuf, int k)`
`GroovyRecognizer(TokenBuffer tokenBuf)`
`GroovyRecognizer(TokenStream lexer, int k)`
`GroovyRecognizer(TokenStream lexer)`
`GroovyRecognizer(ParserSharedInputState state)`

Method Summary
`void` | `aCase()`
`void` | `addWarning(String warning, String solution)`
`void` | `additiveExpression(int lc_stmt)`
`void` | `andExpression(int lc_stmt)`
`void` | `annotation()`
`void` | `annotationArguments()`
`void` | `annotationBlock()`
`void` | `annotationDefinition(AST modifiers)`
`void` | `annotationField()`
`void` | `annotationMemberArrayValueInitializer()`
`void` | `annotationMemberValueInitializer()`
`void` | `annotationMemberValuePair()`
`void` | `annotationMemberValuePairs()`
`void` | `annotationsOpt()`
`void` | `appendedBlock(AST callee)` An appended block follows any expression.
`void` | `argList()`
`byte` | `argument()` A single argument in (...) or [...].
`void` | `argumentLabel()`
`void` | `argumentLabelStart()` For lookahead only.
`void` | `assignmentExpression(int lc_stmt)`
`void` | `assignmentLessExpression()`
`AST` | `attachLast(AST t, Object last)`
`void` | `balancedBrackets()` Fast lookahead across balanced brackets of all sorts.
`void` | `balancedTokens()`
`void` | `blockBody(int prevToken)` A block body is a parade of zero or more statements or expressions.
`void` | `branchStatement()` In Groovy, return, break, continue, throw, and assert can be used in a parenthesized expression context.
`void` | `buildTokenTypeASTClassMap()`
`void` | `builtInType()`
`void` | `builtInTypeArraySpec(boolean addImagNode)`
`void` | `builtInTypeSpec(boolean addImagNode)`
`void` | `caseSList()`
`void` | `casesGroup()`
`void` | `checkSuspiciousExpressionStatement(int prevToken)` If two statements are separated by newline (not SEMI), the second had better not look like the latter half of an expression.
`void` | `classBlock()`
`void` | `classDefinition(AST modifiers)`
`void` | `classField()`
`void` | `classOrInterfaceType(boolean addImagNode)`
`void` | `classTypeSpec(boolean addImagNode)`
`Token` | `cloneToken(Token t)` Clones the token
`void` | `closableBlock()` A block which is known to be a closure, even if it has no apparent arguments.
`void` | `closableBlockConstructorExpression()`
`void` | `closableBlockParam()`
`void` | `closableBlockParamsOpt(boolean addImplicit)` Closure parameters are exactly like method parameters, except that they are not enclosed in parentheses, but rather are prepended to the front of a block, just after the brace.
`void` | `closableBlockParamsStart()` Lookahead to check whether a block begins with explicit closure arguments.
`void` | `closureList()`
`void` | `commandArgument()`
`void` | `commandArguments(AST head)` A member name (x.y) or element name (x[y]) can serve as a command name, which may be followed by a list of arguments.
`void` | `compatibleBodyStatement()` In Java, "if", "while", and "for" statements can take random, non-braced statements as their bodies.
`void` | `compilationUnit()`
`void` | `compoundStatement()`
`void` | `conditionalExpression(int lc_stmt)`
`void` | `constant()` Numeric, string, regexp, boolean, or null constant.
`void` | `constantNumber()` Numeric constant.
`void` | `constructorBody()`
`void` | `constructorDefinition(AST mods)` I've split out constructors separately; we could maybe integrate back into variableDefinitions later on if we maybe simplified 'def' to be a type declaration?
`void` | `constructorStart()` Used to look ahead for a constructor
`void` | `controlExpressionList()`
`AST` | `create(int type, String txt, AST first)` Create an AST node with the token type and text passed in, but with the same background information as another supplied Token (e.g.
`AST` | `create(int type, String txt, Token first, Token last)`
`AST` | `create(int type, String txt, AST first, Token last)`
`AST` | `create(int type, String txt, AST first, AST last)`
`void` | `declaration()` A declaration is the creation of a reference or primitive-type variable, or (if arguments are present) of a method.
`void` | `declarationStart()`
`void` | `declaratorBrackets(AST typ)` After some type names, where zero or more empty bracket pairs are allowed.
`void` | `dynamicMemberName()` If a dot is followed by a parenthesized or quoted expression, the member is computed dynamically, and the member selection is done only at runtime.
`void` | `enumBlock()`
`void` | `enumConstant()`
`void` | `enumConstantBlock()`
`void` | `enumConstantField()`
`void` | `enumConstants()` Comma-separated list of one or more enum constant definitions.
`void` | `enumConstantsStart()` Guard for enumConstants.
`void` | `enumDefinition(AST modifiers)`
`void` | `equalityExpression(int lc_stmt)`
`void` | `exclusiveOrExpression(int lc_stmt)`
`void` | `explicitConstructorInvocation()` Catch obvious constructor calls, but not the expr.super(...) calls
`void` | `expression(int lc_stmt)`
`void` | `expressionStatement(int prevToken)` An expression statement can be any general expression.
`void` | `finallyClause()`
`void` | `forCond()`
`void` | `forInClause()`
`void` | `forInit()`
`void` | `forIter()`
`void` | `forStatement()`
`void` | `genericMethod()`
`void` | `genericMethodStart()`
`GroovyLexer` | `getLexer()`
`List` | `getWarningList()`
`void` | `handler()`
`void` | `identifier()`
`void` | `identifierStar()`
`void` | `implementsClause()`
`void` | `implicitParameters()` A block known to be a closure, but which omits its arguments, is given this placeholder.
`void` | `importStatement()`
`void` | `inclusiveOrExpression(int lc_stmt)`
`void` | `indexPropertyArgs(AST indexee)` An expression may be followed by [...].
`void` | `interfaceBlock()`
`void` | `interfaceDefinition(AST modifiers)`
`void` | `interfaceExtends()`
`void` | `interfaceField()`
`boolean` | `isConstructorIdent(Token x)`
`boolean` | `isUpperCase(Token x)`
`void` | `keywordPropertyNames()` Allowed keywords after dot (as a member name) and before colon (as a label).
`void` | `listOrMapConstructorExpression()` A list constructor is a argument list enclosed in square brackets, without labels.
`void` | `logicalAndExpression(int lc_stmt)`
`void` | `logicalOrExpression(int lc_stmt)`
`static GroovyRecognizer` | `make(GroovyLexer lexer)` This factory is the correct way to wire together a Groovy parser and lexer.
`static GroovyRecognizer` | `make(InputStream in)`
`static GroovyRecognizer` | `make(Reader in)`
`static GroovyRecognizer` | `make(InputBuffer in)`
`static GroovyRecognizer` | `make(LexerSharedInputState in)`
`void` | `methodCallArgs(AST callee)`
`static def` | `mk_tokenSet_0()`
`static def` | `mk_tokenSet_1()`
`static def` | `mk_tokenSet_10()`
`static def` | `mk_tokenSet_11()`
`static def` | `mk_tokenSet_12()`
`static def` | `mk_tokenSet_13()`
`static def` | `mk_tokenSet_14()`
`static def` | `mk_tokenSet_15()`
`static def` | `mk_tokenSet_16()`
`static def` | `mk_tokenSet_17()`
`static def` | `mk_tokenSet_18()`
`static def` | `mk_tokenSet_19()`
`static def` | `mk_tokenSet_2()`
`static def` | `mk_tokenSet_20()`
`static def` | `mk_tokenSet_21()`
`static def` | `mk_tokenSet_22()`
`static def` | `mk_tokenSet_23()`
`static def` | `mk_tokenSet_24()`
`static def` | `mk_tokenSet_25()`
`static def` | `mk_tokenSet_26()`
`static def` | `mk_tokenSet_27()`
`static def` | `mk_tokenSet_28()`
`static def` | `mk_tokenSet_29()`
`static def` | `mk_tokenSet_3()`
`static def` | `mk_tokenSet_30()`
`static def` | `mk_tokenSet_31()`
`static def` | `mk_tokenSet_32()`
`static def` | `mk_tokenSet_33()`
`static def` | `mk_tokenSet_34()`
`static def` | `mk_tokenSet_35()`
`static def` | `mk_tokenSet_36()`
`static def` | `mk_tokenSet_37()`
`static def` | `mk_tokenSet_38()`
`static def` | `mk_tokenSet_39()`
`static def` | `mk_tokenSet_4()`
`static def` | `mk_tokenSet_40()`
`static def` | `mk_tokenSet_41()`
`static def` | `mk_tokenSet_42()`
`static def` | `mk_tokenSet_43()`
`static def` | `mk_tokenSet_44()`
`static def` | `mk_tokenSet_45()`
`static def` | `mk_tokenSet_46()`
`static def` | `mk_tokenSet_47()`
`static def` | `mk_tokenSet_48()`
`static def` | `mk_tokenSet_49()`
`static def` | `mk_tokenSet_5()`
`static def` | `mk_tokenSet_50()`
`static def` | `mk_tokenSet_51()`
`static def` | `mk_tokenSet_52()`
`static def` | `mk_tokenSet_53()`
`static def` | `mk_tokenSet_54()`
`static def` | `mk_tokenSet_55()`
`static def` | `mk_tokenSet_56()`
`static def` | `mk_tokenSet_57()`
`static def` | `mk_tokenSet_58()`
`static def` | `mk_tokenSet_59()`
`static def` | `mk_tokenSet_6()`
`static def` | `mk_tokenSet_60()`
`static def` | `mk_tokenSet_61()`
`static def` | `mk_tokenSet_62()`
`static def` | `mk_tokenSet_63()`
`static def` | `mk_tokenSet_64()`
`static def` | `mk_tokenSet_65()`
`static def` | `mk_tokenSet_66()`
`static def` | `mk_tokenSet_67()`
`static def` | `mk_tokenSet_68()`
`static def` | `mk_tokenSet_69()`
`static def` | `mk_tokenSet_7()`
`static def` | `mk_tokenSet_70()`
`static def` | `mk_tokenSet_71()`
`static def` | `mk_tokenSet_72()`
`static def` | `mk_tokenSet_73()`
`static def` | `mk_tokenSet_74()`
`static def` | `mk_tokenSet_75()`
`static def` | `mk_tokenSet_76()`
`static def` | `mk_tokenSet_77()`
`static def` | `mk_tokenSet_78()`
`static def` | `mk_tokenSet_79()`
`static def` | `mk_tokenSet_8()`
`static def` | `mk_tokenSet_80()`
`static def` | `mk_tokenSet_81()`
`static def` | `mk_tokenSet_82()`
`static def` | `mk_tokenSet_83()`
`static def` | `mk_tokenSet_84()`
`static def` | `mk_tokenSet_85()`
`static def` | `mk_tokenSet_86()`
`static def` | `mk_tokenSet_87()`
`static def` | `mk_tokenSet_88()`
`static def` | `mk_tokenSet_89()`
`static def` | `mk_tokenSet_9()`
`static def` | `mk_tokenSet_90()`
`static def` | `mk_tokenSet_91()`
`void` | `modifier()`
`void` | `modifiers()` A list of one or more modifier, annotation, or "def".
`void` | `modifiersInternal()`
`void` | `modifiersOpt()` A list of zero or more modifiers, annotations, or "def".
`void` | `multiplicativeExpression(int lc_stmt)`
`void` | `namePart()` This is the grammar for what can follow a dot: x.a, x.
`void` | `newArrayDeclarator()`
`void` | `newExpression()`
`void` | `nls()` Zero or more insignificant newlines, all gobbled up and thrown away.
`void` | `nlsWarn()` Zero or more insignificant newlines, all gobbled up and thrown away, but a warning message is left for the user, if there was a newline.
`void` | `openBlock()` An open block is not allowed to have closure arguments.
`void` | `openOrClosableBlock()` A sub-block of a block can be either open or closable.
`void` | `packageDefinition()`
`void` | `parameterDeclaration()` A formal parameter for a method or closure.
`void` | `parameterDeclarationList()` A list of zero or more formal parameters.
`void` | `parameterModifiersOpt()`
`void` | `parenthesizedExpression()`
`void` | `pathElement(AST prefix)`
`void` | `pathElementStart()`
`void` | `pathExpression(int lc_stmt)`
`void` | `postfixExpression(int lc_stmt)`
`void` | `powerExpression(int lc_stmt)`
`void` | `powerExpressionNotPlusMinus(int lc_stmt)`
`void` | `primaryExpression()`
`void` | `qualifiedTypeName()`
`void` | `regexExpression(int lc_stmt)`
`void` | `relationalExpression(int lc_stmt)`
`void` | `require(boolean z, String problem, String solution)`
`void` | `requireFailed(String problem, String solution)`
`void` | `sep()` A statement separator is either a semicolon or a significant newline.
`void` | `setFilename(String f)`
`void` | `setSourceBuffer(SourceBuffer sourceBuffer)`
`void` | `shiftExpression(int lc_stmt)`
`void` | `singleDeclaration()` A declaration with one declarator and optional initialization, like a parameterDeclaration.
`void` | `singleDeclarationNoInit()` A declaration with one declarator and no initialization, like a parameterDeclaration.
`void` | `singleVariable(AST mods, AST t)` Used in cases where a declaration cannot have commas, or ends with the "in" operator instead of '='.
`void` | `snippetUnit()`
`void` | `statement(int prevToken)` A statement is an element of a block.
`void` | `statementLabelPrefix()` A labeled statement, consisting of a vanilla identifier followed by a colon.
`boolean` | `strictContextExpression(boolean allowDeclaration)` Things that can show up as expressions, but only in strict contexts like inside parentheses, argument lists, and list constructors.
`void` | `stringConstructorExpression()`
`void` | `stringConstructorValuePart()`
`void` | `superClassClause()`
`void` | `suspiciousExpressionStatementStart()` Lookahead for suspicious statement warnings and errors.
`void` | `throwsClause()`
`void` | `traceIn(String rname)`
`void` | `traceOut(String rname)`
`void` | `tryBlock()`
`void` | `type()`
`void` | `typeArgument()`
`void` | `typeArgumentBounds()`
`void` | `typeArgumentSpec()`
`void` | `typeArguments()`
`void` | `typeArgumentsOrParametersEnd()`
`void` | `typeDeclarationStart()` Used only as a lookahead predicate for nested type declarations.
`void` | `typeDefinitionInternal(AST mods)`
`void` | `typeParameter()`
`void` | `typeParameterBounds()`
`void` | `typeParameters()`
`void` | `typeSpec(boolean addImagNode)`
`void` | `unaryExpression(int lc_stmt)`
`void` | `unaryExpressionNotPlusMinus(int lc_stmt)`
`void` | `upperCaseIdent()`
`void` | `varInitializer()` An assignment operator '=' followed by an expression.
`void` | `variableDeclarator(AST mods, AST t, Token first)` Declaration of a variable.
`void` | `variableDefinitions(AST mods, AST t)`
`void` | `variableName()`
`void` | `wildcardType()`

Constructor Detail

### GroovyRecognizer

    GroovyRecognizer(TokenBuffer tokenBuf, int k)

### GroovyRecognizer

    public GroovyRecognizer(TokenBuffer tokenBuf)

### GroovyRecognizer

    GroovyRecognizer(TokenStream lexer, int k)

### GroovyRecognizer

    public GroovyRecognizer(TokenStream lexer)

### GroovyRecognizer

    public GroovyRecognizer(ParserSharedInputState state)

Method Detail

### aCase

    public void aCase()

### addWarning

    public void addWarning(String warning, String solution)

### additiveExpression

    public void additiveExpression(int lc_stmt)

### andExpression

    public void andExpression(int lc_stmt)

### annotation

    public void annotation()

### annotationArguments

    public void annotationArguments()

### annotationBlock

    public void annotationBlock()

### annotationDefinition

    public void annotationDefinition(AST modifiers)

### annotationField

    public void annotationField()

### annotationMemberArrayValueInitializer

    public void annotationMemberArrayValueInitializer()

### annotationMemberValueInitializer

    public void annotationMemberValueInitializer()

### annotationMemberValuePair

    public void annotationMemberValuePair()

### annotationMemberValuePairs

    public void annotationMemberValuePairs()

### annotationsOpt

    public void annotationsOpt()

### appendedBlock

    public void appendedBlock(AST callee)

  An appended block follows any expression. If the expression is not a method call, it is given an empty argument list.

### argList

    public void argList()

### argument

    public byte argument()

  A single argument in (...) or [...]. Corresponds to to a method or closure parameter. May be labeled. May be modified by the spread operator '*' ('*:' for keywords).

### argumentLabel

    public void argumentLabel()

### argumentLabelStart

    public void argumentLabelStart()

  For lookahead only. Fast approximate parse of an argumentLabel followed by a colon.

### assignmentExpression

    public void assignmentExpression(int lc_stmt)

### assignmentLessExpression

    public void assignmentLessExpression()

### attachLast

    AST attachLast(AST t, Object last)

### balancedBrackets

    public void balancedBrackets()

  Fast lookahead across balanced brackets of all sorts.

### balancedTokens

    public void balancedTokens()

### blockBody

    public void blockBody(int prevToken)

  A block body is a parade of zero or more statements or expressions.

### branchStatement

    public void branchStatement()

  In Groovy, return, break, continue, throw, and assert can be used in a parenthesized expression context. Example: println (x || (return)); println assert x, "won't print a false value!" If an optional expression is missing, its value is void (this coerces to null when a value is required).

### buildTokenTypeASTClassMap

    void buildTokenTypeASTClassMap()

### builtInType

    public void builtInType()

### builtInTypeArraySpec

    public void builtInTypeArraySpec(boolean addImagNode)

### builtInTypeSpec

    public void builtInTypeSpec(boolean addImagNode)

### caseSList

    public void caseSList()

### casesGroup

    public void casesGroup()

### checkSuspiciousExpressionStatement

    public void checkSuspiciousExpressionStatement(int prevToken)

  If two statements are separated by newline (not SEMI), the second had better not look like the latter half of an expression. If it does, issue a warning.

  Also, if the expression starts with a closure, it needs to have an explicit parameter list, in order to avoid the appearance of a compound statement. This is a hard error.

  These rules are different from Java's "dumb expression" restriction. Unlike Java, Groovy blocks can end with arbitrary (even dumb) expressions, as a consequence of optional 'return' and 'continue' tokens.

  To make the programmer's intention clear, a leading closure must have an explicit parameter list, and must not follow a previous statement separated only by newlines.

### classBlock

    public void classBlock()

### classDefinition

    public void classDefinition(AST modifiers)

### classField

    public void classField()

### classOrInterfaceType

    public void classOrInterfaceType(boolean addImagNode)

### classTypeSpec

    public void classTypeSpec(boolean addImagNode)

### cloneToken

    public Token cloneToken(Token t)

  Clones the token

### closableBlock

    public void closableBlock()

  A block which is known to be a closure, even if it has no apparent arguments. A block inside an expression or after a method call is always assumed to be a closure. Only labeled, unparameterized blocks which occur directly as substatements are kept open.

### closableBlockConstructorExpression

    public void closableBlockConstructorExpression()

### closableBlockParam

    public void closableBlockParam()

### closableBlockParamsOpt

    public void closableBlockParamsOpt(boolean addImplicit)

  Closure parameters are exactly like method parameters, except that they are not enclosed in parentheses, but rather are prepended to the front of a block, just after the brace. They are separated from the closure body by a CLOSABLE_BLOCK_OP token '->'.

### closableBlockParamsStart

    public void closableBlockParamsStart()

  Lookahead to check whether a block begins with explicit closure arguments.

### closureList

    public void closureList()

### commandArgument

    public void commandArgument()

### commandArguments

    public void commandArguments(AST head)

  A member name (x.y) or element name (x[y]) can serve as a command name, which may be followed by a list of arguments. Unlike parenthesized arguments, these must be plain expressions, without labels or spread operators.

### compatibleBodyStatement

    public void compatibleBodyStatement()

  In Java, "if", "while", and "for" statements can take random, non-braced statements as their bodies. Support this practice, even though it isn't very Groovy.

### compilationUnit

    public void compilationUnit()

### compoundStatement

    public void compoundStatement()

### conditionalExpression

    public void conditionalExpression(int lc_stmt)

### constant

    public void constant()

  Numeric, string, regexp, boolean, or null constant.

### constantNumber

    public void constantNumber()

  Numeric constant.

### constructorBody

    public void constructorBody()

### constructorDefinition

    public void constructorDefinition(AST mods)

  I've split out constructors separately; we could maybe integrate back into variableDefinitions later on if we maybe simplified 'def' to be a type declaration?

### constructorStart

    public void constructorStart()

  Used to look ahead for a constructor

### controlExpressionList

    public void controlExpressionList()

### create

    public AST create(int type, String txt, AST first)

  Create an AST node with the token type and text passed in, but with the same background information as another supplied Token (e.g. line numbers). To be used in place of antlr tree construction syntax, i.e. #[TOKEN,"text"] becomes create(TOKEN,"text",anotherToken) todo - change antlr.ASTFactory to do this instead...

### create

    public AST create(int type, String txt, Token first, Token last)

### create

    public AST create(int type, String txt, AST first, Token last)

### create

    public AST create(int type, String txt, AST first, AST last)

### declaration

    public void declaration()

  A declaration is the creation of a reference or primitive-type variable, or (if arguments are present) of a method. Generically, this is called a 'variable' definition, even in the case of a class field or method. It may start with the modifiers and/or a declaration keyword "def". It may also start with the modifiers and a capitalized type name.

  AST effect: Create a separate Type/Var tree for each var in the var list. Must be guarded, as in (declarationStart) => declaration.

### declarationStart

    public void declarationStart()

### declaratorBrackets

    public void declaratorBrackets(AST typ)

  After some type names, where zero or more empty bracket pairs are allowed. We use ARRAY_DECLARATOR to represent this. TODO: Is there some more Groovy way to view this in terms of the indexed property syntax?

### dynamicMemberName

    public void dynamicMemberName()

  If a dot is followed by a parenthesized or quoted expression, the member is computed dynamically, and the member selection is done only at runtime. This forces a statically unchecked member access.

### enumBlock

    public void enumBlock()

### enumConstant

    public void enumConstant()

### enumConstantBlock

    public void enumConstantBlock()

### enumConstantField

    public void enumConstantField()

### enumConstants

    public void enumConstants()

  Comma-separated list of one or more enum constant definitions.

### enumConstantsStart

    public void enumConstantsStart()

  Guard for enumConstants.

### enumDefinition

    public void enumDefinition(AST modifiers)

### equalityExpression

    public void equalityExpression(int lc_stmt)

### exclusiveOrExpression

    public void exclusiveOrExpression(int lc_stmt)

### explicitConstructorInvocation

    public void explicitConstructorInvocation()

  Catch obvious constructor calls, but not the expr.super(...) calls

### expression

    public void expression(int lc_stmt)

### expressionStatement

    public void expressionStatement(int prevToken)

  An expression statement can be any general expression.

  An expression statement can also be a command, which is a simple method call in which the outermost parentheses are omitted.

  Certain "suspicious" looking forms are flagged for the user to disambiguate.

### finallyClause

    public void finallyClause()

### forCond

    public void forCond()

### forInClause

    public void forInClause()

### forInit

    public void forInit()

### forIter

    public void forIter()

### forStatement

    public void forStatement()

### genericMethod

    public void genericMethod()

### genericMethodStart

    public void genericMethodStart()

### getLexer

    public GroovyLexer getLexer()

### getWarningList

    public List getWarningList()

### handler

    public void handler()

### identifier

    public void identifier()

### identifierStar

    public void identifierStar()

### implementsClause

    public void implementsClause()

### implicitParameters

    public void implicitParameters()

  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.

### importStatement

    public void importStatement()

### inclusiveOrExpression

    public void inclusiveOrExpression(int lc_stmt)

### indexPropertyArgs

    public void indexPropertyArgs(AST indexee)

  An expression may be followed by [...]. Unlike Java, these brackets may contain a general argument list, which is passed to the array element operator, which can make of it what it wants. The brackets may also be empty, as in T[]. This is how Groovy names array types.

  Returned AST is [INDEX_OP, indexee, ELIST].

### interfaceBlock

    public void interfaceBlock()

### interfaceDefinition

    public void interfaceDefinition(AST modifiers)

### interfaceExtends

    public void interfaceExtends()

### interfaceField

    public void interfaceField()

### isConstructorIdent

    boolean isConstructorIdent(Token x)

### isUpperCase

    boolean isUpperCase(Token x)

### keywordPropertyNames

    public void keywordPropertyNames()

  Allowed keywords after dot (as a member name) and before colon (as a label). TODO: What's the rationale for these?

### listOrMapConstructorExpression

    public void listOrMapConstructorExpression()

  A list constructor is a argument list enclosed in square brackets, without labels. Any argument can be decorated with a spread operator (*x), but not a label (a:x). Examples: [], [1], [1,2], [1,*l1,2], [*l1,*l2]. (The l1, l2 must be a sequence or null.)

  A map constructor is an argument list enclosed in square brackets, with labels everywhere, except on spread arguments, which stand for whole maps spliced in. A colon alone between the brackets also forces the expression to be an empty map constructor. Examples: [:], [a:1], [a:1,b:2], [a:1,*:m1,b:2], [*:m1,*:m2] (The m1, m2 must be a map or null.) Values associated with identical keys overwrite from left to right: [a:1,a:2] === [a:2]

  Some malformed constructor expressions are not detected in the parser, but in a post-pass. Bad examples: [1,b:2], [a:1,2], [:1]. (Note that method call arguments, by contrast, can be a mix of keyworded and non-keyworded arguments.)

### logicalAndExpression

    public void logicalAndExpression(int lc_stmt)

### logicalOrExpression

    public void logicalOrExpression(int lc_stmt)

### make

    public static GroovyRecognizer make(GroovyLexer lexer)

  This factory is the correct way to wire together a Groovy parser and lexer.

### make

    public static GroovyRecognizer make(InputStream in)

### make

    public static GroovyRecognizer make(Reader in)

### make

    public static GroovyRecognizer make(InputBuffer in)

### make

    public static GroovyRecognizer make(LexerSharedInputState in)

### methodCallArgs

    public void methodCallArgs(AST callee)

### mk_tokenSet_0

    static def mk_tokenSet_0()

### mk_tokenSet_1

    static def mk_tokenSet_1()

### mk_tokenSet_10

    static def mk_tokenSet_10()

### mk_tokenSet_11

    static def mk_tokenSet_11()

### mk_tokenSet_12

    static def mk_tokenSet_12()

### mk_tokenSet_13

    static def mk_tokenSet_13()

### mk_tokenSet_14

    static def mk_tokenSet_14()

### mk_tokenSet_15

    static def mk_tokenSet_15()

### mk_tokenSet_16

    static def mk_tokenSet_16()

### mk_tokenSet_17

    static def mk_tokenSet_17()

### mk_tokenSet_18

    static def mk_tokenSet_18()

### mk_tokenSet_19

    static def mk_tokenSet_19()

### mk_tokenSet_2

    static def mk_tokenSet_2()

### mk_tokenSet_20

    static def mk_tokenSet_20()

### mk_tokenSet_21

    static def mk_tokenSet_21()

### mk_tokenSet_22

    static def mk_tokenSet_22()

### mk_tokenSet_23

    static def mk_tokenSet_23()

### mk_tokenSet_24

    static def mk_tokenSet_24()

### mk_tokenSet_25

    static def mk_tokenSet_25()

### mk_tokenSet_26

    static def mk_tokenSet_26()

### mk_tokenSet_27

    static def mk_tokenSet_27()

### mk_tokenSet_28

    static def mk_tokenSet_28()

### mk_tokenSet_29

    static def mk_tokenSet_29()

### mk_tokenSet_3

    static def mk_tokenSet_3()

### mk_tokenSet_30

    static def mk_tokenSet_30()

### mk_tokenSet_31

    static def mk_tokenSet_31()

### mk_tokenSet_32

    static def mk_tokenSet_32()

### mk_tokenSet_33

    static def mk_tokenSet_33()

### mk_tokenSet_34

    static def mk_tokenSet_34()

### mk_tokenSet_35

    static def mk_tokenSet_35()

### mk_tokenSet_36

    static def mk_tokenSet_36()

### mk_tokenSet_37

    static def mk_tokenSet_37()

### mk_tokenSet_38

    static def mk_tokenSet_38()

### mk_tokenSet_39

    static def mk_tokenSet_39()

### mk_tokenSet_4

    static def mk_tokenSet_4()

### mk_tokenSet_40

    static def mk_tokenSet_40()

### mk_tokenSet_41

    static def mk_tokenSet_41()

### mk_tokenSet_42

    static def mk_tokenSet_42()

### mk_tokenSet_43

    static def mk_tokenSet_43()

### mk_tokenSet_44

    static def mk_tokenSet_44()

### mk_tokenSet_45

    static def mk_tokenSet_45()

### mk_tokenSet_46

    static def mk_tokenSet_46()

### mk_tokenSet_47

    static def mk_tokenSet_47()

### mk_tokenSet_48

    static def mk_tokenSet_48()

### mk_tokenSet_49

    static def mk_tokenSet_49()

### mk_tokenSet_5

    static def mk_tokenSet_5()

### mk_tokenSet_50

    static def mk_tokenSet_50()

### mk_tokenSet_51

    static def mk_tokenSet_51()

### mk_tokenSet_52

    static def mk_tokenSet_52()

### mk_tokenSet_53

    static def mk_tokenSet_53()

### mk_tokenSet_54

    static def mk_tokenSet_54()

### mk_tokenSet_55

    static def mk_tokenSet_55()

### mk_tokenSet_56

    static def mk_tokenSet_56()

### mk_tokenSet_57

    static def mk_tokenSet_57()

### mk_tokenSet_58

    static def mk_tokenSet_58()

### mk_tokenSet_59

    static def mk_tokenSet_59()

### mk_tokenSet_6

    static def mk_tokenSet_6()

### mk_tokenSet_60

    static def mk_tokenSet_60()

### mk_tokenSet_61

    static def mk_tokenSet_61()

### mk_tokenSet_62

    static def mk_tokenSet_62()

### mk_tokenSet_63

    static def mk_tokenSet_63()

### mk_tokenSet_64

    static def mk_tokenSet_64()

### mk_tokenSet_65

    static def mk_tokenSet_65()

### mk_tokenSet_66

    static def mk_tokenSet_66()

### mk_tokenSet_67

    static def mk_tokenSet_67()

### mk_tokenSet_68

    static def mk_tokenSet_68()

### mk_tokenSet_69

    static def mk_tokenSet_69()

### mk_tokenSet_7

    static def mk_tokenSet_7()

### mk_tokenSet_70

    static def mk_tokenSet_70()

### mk_tokenSet_71

    static def mk_tokenSet_71()

### mk_tokenSet_72

    static def mk_tokenSet_72()

### mk_tokenSet_73

    static def mk_tokenSet_73()

### mk_tokenSet_74

    static def mk_tokenSet_74()

### mk_tokenSet_75

    static def mk_tokenSet_75()

### mk_tokenSet_76

    static def mk_tokenSet_76()

### mk_tokenSet_77

    static def mk_tokenSet_77()

### mk_tokenSet_78

    static def mk_tokenSet_78()

### mk_tokenSet_79

    static def mk_tokenSet_79()

### mk_tokenSet_8

    static def mk_tokenSet_8()

### mk_tokenSet_80

    static def mk_tokenSet_80()

### mk_tokenSet_81

    static def mk_tokenSet_81()

### mk_tokenSet_82

    static def mk_tokenSet_82()

### mk_tokenSet_83

    static def mk_tokenSet_83()

### mk_tokenSet_84

    static def mk_tokenSet_84()

### mk_tokenSet_85

    static def mk_tokenSet_85()

### mk_tokenSet_86

    static def mk_tokenSet_86()

### mk_tokenSet_87

    static def mk_tokenSet_87()

### mk_tokenSet_88

    static def mk_tokenSet_88()

### mk_tokenSet_89

    static def mk_tokenSet_89()

### mk_tokenSet_9

    static def mk_tokenSet_9()

### mk_tokenSet_90

    static def mk_tokenSet_90()

### mk_tokenSet_91

    static def mk_tokenSet_91()

### modifier

    public void modifier()

### modifiers

    public void modifiers()

  A list of one or more modifier, annotation, or "def".

### modifiersInternal

    public void modifiersInternal()

### modifiersOpt

    public void modifiersOpt()

  A list of zero or more modifiers, annotations, or "def".

### multiplicativeExpression

    public void multiplicativeExpression(int lc_stmt)

### namePart

    public void namePart()

  This is the grammar for what can follow a dot: x.a, x.
  a:
    , x.&a, x.'a', etc.
  Note: `typeArguments` is handled by the caller of `namePart`.

### newArrayDeclarator

    public void newArrayDeclarator()

### newExpression

    public void newExpression()

### nls

    public void nls()

  Zero or more insignificant newlines, all gobbled up and thrown away.

### nlsWarn

    public void nlsWarn()

  Zero or more insignificant newlines, all gobbled up and thrown away, but a warning message is left for the user, if there was a newline.

### openBlock

    public void openBlock()

  An open block is not allowed to have closure arguments.

### openOrClosableBlock

    public void openOrClosableBlock()

  A sub-block of a block can be either open or closable. It is closable if and only if there are explicit closure arguments. Compare this to a block which is appended to a method call, which is given closure arguments, even if they are not explicit in the code.

### packageDefinition

    public void packageDefinition()

### parameterDeclaration

    public void parameterDeclaration()

  A formal parameter for a method or closure.

### parameterDeclarationList

    public void parameterDeclarationList()

  A list of zero or more formal parameters. If a parameter is variable length (e.g. String... myArg) it should be to the right of any other parameters of the same kind. General form: (req, ..., opt, ..., [rest], key, ..., [restKeys], [block] This must be sorted out after parsing, since the various declaration forms are impossible to tell apart without backtracking.

### parameterModifiersOpt

    public void parameterModifiersOpt()

### parenthesizedExpression

    public void parenthesizedExpression()

### pathElement

    public void pathElement(AST prefix)

### pathElementStart

    public void pathElementStart()

### pathExpression

    public void pathExpression(int lc_stmt)

### postfixExpression

    public void postfixExpression(int lc_stmt)

### powerExpression

    public void powerExpression(int lc_stmt)

### powerExpressionNotPlusMinus

    public void powerExpressionNotPlusMinus(int lc_stmt)

### primaryExpression

    public void primaryExpression()

### qualifiedTypeName

    public void qualifiedTypeName()

### regexExpression

    public void regexExpression(int lc_stmt)

### relationalExpression

    public void relationalExpression(int lc_stmt)

### require

    void require(boolean z, String problem, String solution)

### requireFailed

    public void requireFailed(String problem, String solution)

### sep

    public void sep()

  A statement separator is either a semicolon or a significant newline. Any number of additional (insignificant) newlines may accompany it.

### setFilename

    public void setFilename(String f)

### setSourceBuffer

    public void setSourceBuffer(SourceBuffer sourceBuffer)

### shiftExpression

    public void shiftExpression(int lc_stmt)

### singleDeclaration

    public void singleDeclaration()

  A declaration with one declarator and optional initialization, like a parameterDeclaration. Used to parse declarations used for both binding and effect, in places like argument lists and `while` statements.

### singleDeclarationNoInit

    public void singleDeclarationNoInit()

  A declaration with one declarator and no initialization, like a parameterDeclaration. Used to parse loops like `for (int x in y)` (up to the `in` keyword).

### singleVariable

    public void singleVariable(AST mods, AST t)

  Used in cases where a declaration cannot have commas, or ends with the "in" operator instead of '='.

### snippetUnit

    public void snippetUnit()

### statement

    public void statement(int prevToken)

  A statement is an element of a block. Typical statements are declarations (which are scoped to the block) and expressions.

### statementLabelPrefix

    public void statementLabelPrefix()

  A labeled statement, consisting of a vanilla identifier followed by a colon.

### strictContextExpression

    public boolean strictContextExpression(boolean allowDeclaration)

  Things that can show up as expressions, but only in strict contexts like inside parentheses, argument lists, and list constructors.

### stringConstructorExpression

    public void stringConstructorExpression()

### stringConstructorValuePart

    public void stringConstructorValuePart()

### superClassClause

    public void superClassClause()

### suspiciousExpressionStatementStart

    public void suspiciousExpressionStatementStart()

  Lookahead for suspicious statement warnings and errors.

### throwsClause

    public void throwsClause()

### traceIn

    public void traceIn(String rname)

### traceOut

    public void traceOut(String rname)

### tryBlock

    public void tryBlock()

### type

    public void type()

### typeArgument

    public void typeArgument()

### typeArgumentBounds

    public void typeArgumentBounds()

### typeArgumentSpec

    public void typeArgumentSpec()

### typeArguments

    public void typeArguments()

### typeArgumentsOrParametersEnd

    void typeArgumentsOrParametersEnd()

### typeDeclarationStart

    public void typeDeclarationStart()

  Used only as a lookahead predicate for nested type declarations.

### typeDefinitionInternal

    void typeDefinitionInternal(AST mods)

### typeParameter

    public void typeParameter()

### typeParameterBounds

    public void typeParameterBounds()

### typeParameters

    public void typeParameters()

### typeSpec

    public void typeSpec(boolean addImagNode)

### unaryExpression

    public void unaryExpression(int lc_stmt)

### unaryExpressionNotPlusMinus

    public void unaryExpressionNotPlusMinus(int lc_stmt)

### upperCaseIdent

    public void upperCaseIdent()

### varInitializer

    public void varInitializer()

  An assignment operator '=' followed by an expression. (Never empty.)

### variableDeclarator

    public void variableDeclarator(AST mods, AST t, Token first)

  Declaration of a variable. This can be a class/instance variable, or a local variable in a method It can also include possible initialization.

### variableDefinitions

    public void variableDefinitions(AST mods, AST t)

### variableName

    public void variableName()

### wildcardType

    public void wildcardType()