## org.codehaus.groovy.antlr
Class AntlrParserPlugin

A parser plugin which adapts the JSR Antlr Parser to the Groovy runtime

author:
  James Strachan

version:
  $Revision: 11961 $

Field Summary
`AST` | `ast`
`ClassNode` | `classNode`
`def` | `tokenNames`

Constructor Summary
`AntlrParserPlugin()`

Method Summary
`boolean` | `addArgumentExpression(AST node, List expressionList)`
`AnnotationNode` | `annotation(AST annotationNode)`
`Expression` | `arguments(AST elist)`
`List` | `arraySizeExpression(AST node)`
`Expression` | `asExpression(AST node)`
`void` | `assertNodeType(int type, AST node)`
`Statement` | `assertStatement(AST assertNode)`
`void` | `assertTypeNotNull(ClassNode type, AST rightNode)`
`Expression` | `binaryExpression(int type, AST node)`
`Expression` | `blockExpression(AST node)`
`BooleanExpression` | `booleanExpression(AST node)`
`Statement` | `breakStatement(AST node)`
`ModuleNode` | `buildAST(SourceUnit sourceUnit, ClassLoader classLoader, Reduction cst)`
`ClassNode` | `buildName(AST node)` Extracts an identifier from the Antlr AST and then performs a name resolution to see if the given name is a type from imports, aliases or newly created classes
`Statement` | `caseStatements(AST node, List cases)`
`Expression` | `castExpression(AST castNode)`
`CatchStatement` | `catchStatement(AST catchNode)`
`void` | `checkNoInvalidModifier(AST node, String nodeType, int modifiers, int modifier, String modifierText)`
`void` | `classDef(AST classDef)`
`ClosureExpression` | `closureExpression(AST node)`
`ClosureListExpression` | `closureListExpression(AST node)`
`void` | `configureAST(ASTNode node, AST ast)`
`Expression` | `constructorCallExpression(AST node)`
`void` | `constructorDef(AST constructorDef)`
`Statement` | `continueStatement(AST node)`
`void` | `convertGroovy(AST node)` Converts the Antlr AST to the Groovy AST
`ConstantExpression` | `decimalExpression(AST node)`
`Expression` | `declarationExpression(AST variableDef)`
`Expression` | `dotExpression(AST node)`
`void` | `dump(AST node)`
`void` | `dumpTree(AST ast)`
`Expression` | `dynamicMemberExpression(AST dynamicMemberNode)`
`void` | `enumConstantDef(AST node)`
`void` | `enumDef(AST enumNode)`
`Expression` | `expression(AST node)`
`Expression` | `expression(AST node, boolean convertToConstant)`
`Expression` | `expressionList(AST node)`
`Expression` | `expressionSwitch(AST node)`
`void` | `fieldDef(AST fieldDef)`
`Statement` | `forStatement(AST forNode)`
`int` | `getBoundType(AST node)`
`String` | `getFirstChildText(AST node)`
`String` | `getTokenName(int token)`
`String` | `getTokenName(AST node)`
`static AST` | `getTypeArgumentsNode(AST root)`
`int` | `getTypeInParenthesis(AST node)`
`Expression` | `gstring(AST gstringNode)`
`boolean` | `hasVisibility(int modifiers)` Returns true if the modifiers flags contain a visibility modifier
`String` | `identifier(AST node)` Extracts an identifier from the Antlr AST
`Statement` | `ifStatement(AST ifNode)`
`void` | `importDef(AST importNode)`
`Expression` | `indexExpression(AST indexNode)`
`Expression` | `instanceofExpression(AST node)`
`ConstantExpression` | `integerExpression(AST node)`
`void` | `interfaceDef(AST classDef)`
`def` | `interfaces(AST node)`
`boolean` | `isAnInterface()`
`boolean` | `isPrimitiveTypeLiteral(AST node)`
`static boolean` | `isType(int typeCode, AST node)`
`String` | `label(AST labelNode)`
`Statement` | `labelledStatement(AST labelNode)`
`Expression` | `listExpression(AST listNode)`
`GenericsType` | `makeGenericsArgumentType(AST rootNode)`
`def` | `makeGenericsBounds(AST rn, int boundType)`
`def` | `makeGenericsType(AST rootNode)`
`static Token` | `makeToken(int typeCode, AST node)`
`ClassNode` | `makeType(AST typeNode)`
`ClassNode` | `makeTypeWithArguments(AST rootNode)`
`MapEntryExpression` | `mapEntryExpression(AST node)`
`Expression` | `mapExpression(AST mapNode)` Typically only used for map constructors I think?
`Statement` | `methodCall(AST code)`
`Expression` | `methodCallExpression(AST methodCallNode)`
`void` | `methodDef(AST methodDef)`
`Expression` | `methodPointerExpression(AST node)`
`int` | `modifiers(AST modifierNode, List annotations, int defaultModifiers)`
`void` | `notImplementedYet(AST node)`
`void` | `objectBlock(AST objectBlock)`
`void` | `objectInit(AST init)`
`void` | `outputASTInVariousFormsIfNeeded(SourceUnit sourceUnit, SourceBuffer sourceBuffer)`
`void` | `packageDef(AST packageDef)`
`Parameter` | `parameter(AST paramNode)`
`def` | `parameters(AST parametersNode)`
`Reduction` | `parseCST(SourceUnit sourceUnit, Reader reader)`
`Expression` | `postfixExpression(AST node, int token)`
`Expression` | `prefixExpression(AST node, int token)`
`static String` | `qualifiedName(AST qualifiedNameNode)`
`Expression` | `rangeExpression(AST rangeNode, boolean inclusive)`
`Statement` | `returnStatement(AST node)`
`void` | `saveAsXML(String name, AST ast)`
`boolean` | `setAccessTrue(AST node, boolean access)`
`int` | `setModifierBit(AST node, int answer, int bit)`
`Expression` | `specialConstructorCallExpression(AST methodCallNode, ClassNode special)`
`Expression` | `spreadExpression(AST node)`
`Expression` | `spreadMapExpression(AST node)`
`Statement` | `statement(AST node)`
`Statement` | `statementList(AST code)`
`Statement` | `statementListNoChild(AST node)`
`void` | `staticInit(AST staticInit)`
`Statement` | `switchStatement(AST switchNode)`
`Statement` | `synchronizedStatement(AST syncNode)`
`Expression` | `ternaryExpression(AST ternaryNode)`
`Statement` | `throwStatement(AST node)`
`void` | `throwsList(AST node, List list)`
`Statement` | `tryStatement(AST tryStatementNode)`
`ClassNode` | `type(AST typeNode)`
`Expression` | `unaryMinusExpression(AST unaryMinusExpr)`
`Expression` | `unaryPlusExpression(AST unaryPlusExpr)`
`void` | `unknownAST(AST node)`
`Statement` | `variableDef(AST variableDef)`
`Expression` | `variableExpression(AST node)`
`Statement` | `whileStatement(AST whileNode)`

Constructor Detail

### AntlrParserPlugin

    AntlrParserPlugin()

Method Detail

### addArgumentExpression

    boolean addArgumentExpression(AST node, List expressionList)

### annotation

    AnnotationNode annotation(AST annotationNode)

### arguments

    Expression arguments(AST elist)

### arraySizeExpression

    List arraySizeExpression(AST node)

### asExpression

    Expression asExpression(AST node)

### assertNodeType

    void assertNodeType(int type, AST node)

### assertStatement

    Statement assertStatement(AST assertNode)

### assertTypeNotNull

    void assertTypeNotNull(ClassNode type, AST rightNode)

### binaryExpression

    Expression binaryExpression(int type, AST node)

### blockExpression

    Expression blockExpression(AST node)

### booleanExpression

    BooleanExpression booleanExpression(AST node)

### breakStatement

    Statement breakStatement(AST node)

### buildAST

    public ModuleNode buildAST(SourceUnit sourceUnit, ClassLoader classLoader, Reduction cst)

### buildName

    ClassNode buildName(AST node)

  Extracts an identifier from the Antlr AST and then performs a name resolution to see if the given name is a type from imports, aliases or newly created classes

### caseStatements

    Statement caseStatements(AST node, List cases)

### castExpression

    Expression castExpression(AST castNode)

### catchStatement

    CatchStatement catchStatement(AST catchNode)

### checkNoInvalidModifier

    void checkNoInvalidModifier(AST node, String nodeType, int modifiers, int modifier, String modifierText)

### classDef

    void classDef(AST classDef)

### closureExpression

    ClosureExpression closureExpression(AST node)

### closureListExpression

    ClosureListExpression closureListExpression(AST node)

### configureAST

    void configureAST(ASTNode node, AST ast)

### constructorCallExpression

    Expression constructorCallExpression(AST node)

### constructorDef

    void constructorDef(AST constructorDef)

### continueStatement

    Statement continueStatement(AST node)

### convertGroovy

    void convertGroovy(AST node)

  Converts the Antlr AST to the Groovy AST

### decimalExpression

    ConstantExpression decimalExpression(AST node)

### declarationExpression

    Expression declarationExpression(AST variableDef)

### dotExpression

    Expression dotExpression(AST node)

### dump

    void dump(AST node)

### dumpTree

    void dumpTree(AST ast)

### dynamicMemberExpression

    Expression dynamicMemberExpression(AST dynamicMemberNode)

### enumConstantDef

    void enumConstantDef(AST node)

### enumDef

    void enumDef(AST enumNode)

### expression

    Expression expression(AST node)

### expression

    Expression expression(AST node, boolean convertToConstant)

### expressionList

    Expression expressionList(AST node)

### expressionSwitch

    Expression expressionSwitch(AST node)

### fieldDef

    void fieldDef(AST fieldDef)

### forStatement

    Statement forStatement(AST forNode)

### getBoundType

    int getBoundType(AST node)

### getFirstChildText

    String getFirstChildText(AST node)

### getTokenName

    String getTokenName(int token)

### getTokenName

    String getTokenName(AST node)

### getTypeArgumentsNode

    static AST getTypeArgumentsNode(AST root)

### getTypeInParenthesis

    int getTypeInParenthesis(AST node)

### gstring

    Expression gstring(AST gstringNode)

### hasVisibility

    boolean hasVisibility(int modifiers)

  Returns true if the modifiers flags contain a visibility modifier

### identifier

    String identifier(AST node)

  Extracts an identifier from the Antlr AST

### ifStatement

    Statement ifStatement(AST ifNode)

### importDef

    void importDef(AST importNode)

### indexExpression

    Expression indexExpression(AST indexNode)

### instanceofExpression

    Expression instanceofExpression(AST node)

### integerExpression

    ConstantExpression integerExpression(AST node)

### interfaceDef

    void interfaceDef(AST classDef)

### interfaces

    def interfaces(AST node)

### isAnInterface

    boolean isAnInterface()

### isPrimitiveTypeLiteral

    boolean isPrimitiveTypeLiteral(AST node)

### isType

    public static boolean isType(int typeCode, AST node)

### label

    String label(AST labelNode)

### labelledStatement

    Statement labelledStatement(AST labelNode)

### listExpression

    Expression listExpression(AST listNode)

### makeGenericsArgumentType

    GenericsType makeGenericsArgumentType(AST rootNode)

### makeGenericsBounds

    def makeGenericsBounds(AST rn, int boundType)

### makeGenericsType

    def makeGenericsType(AST rootNode)

### makeToken

    static Token makeToken(int typeCode, AST node)

### makeType

    ClassNode makeType(AST typeNode)

### makeTypeWithArguments

    ClassNode makeTypeWithArguments(AST rootNode)

### mapEntryExpression

    MapEntryExpression mapEntryExpression(AST node)

### mapExpression

    Expression mapExpression(AST mapNode)

  Typically only used for map constructors I think?

### methodCall

    Statement methodCall(AST code)

### methodCallExpression

    Expression methodCallExpression(AST methodCallNode)

### methodDef

    void methodDef(AST methodDef)

### methodPointerExpression

    Expression methodPointerExpression(AST node)

### modifiers

    int modifiers(AST modifierNode, List annotations, int defaultModifiers)

### notImplementedYet

    void notImplementedYet(AST node)

### objectBlock

    void objectBlock(AST objectBlock)

### objectInit

    void objectInit(AST init)

### outputASTInVariousFormsIfNeeded

    void outputASTInVariousFormsIfNeeded(SourceUnit sourceUnit, SourceBuffer sourceBuffer)

### packageDef

    void packageDef(AST packageDef)

### parameter

    Parameter parameter(AST paramNode)

### parameters

    def parameters(AST parametersNode)

### parseCST

    public Reduction parseCST(SourceUnit sourceUnit, Reader reader)

### postfixExpression

    Expression postfixExpression(AST node, int token)

### prefixExpression

    Expression prefixExpression(AST node, int token)

### qualifiedName

    public static String qualifiedName(AST qualifiedNameNode)

### rangeExpression

    Expression rangeExpression(AST rangeNode, boolean inclusive)

### returnStatement

    Statement returnStatement(AST node)

### saveAsXML

    void saveAsXML(String name, AST ast)

### setAccessTrue

    boolean setAccessTrue(AST node, boolean access)

### setModifierBit

    int setModifierBit(AST node, int answer, int bit)

### specialConstructorCallExpression

    Expression specialConstructorCallExpression(AST methodCallNode, ClassNode special)

### spreadExpression

    Expression spreadExpression(AST node)

### spreadMapExpression

    Expression spreadMapExpression(AST node)

### statement

    Statement statement(AST node)

### statementList

    Statement statementList(AST code)

### statementListNoChild

    Statement statementListNoChild(AST node)

### staticInit

    void staticInit(AST staticInit)

### switchStatement

    Statement switchStatement(AST switchNode)

### synchronizedStatement

    Statement synchronizedStatement(AST syncNode)

### ternaryExpression

    Expression ternaryExpression(AST ternaryNode)

### throwStatement

    Statement throwStatement(AST node)

### throwsList

    void throwsList(AST node, List list)

### tryStatement

    Statement tryStatement(AST tryStatementNode)

### type

    ClassNode type(AST typeNode)

### unaryMinusExpression

    Expression unaryMinusExpression(AST unaryMinusExpr)

### unaryPlusExpression

    Expression unaryPlusExpression(AST unaryPlusExpr)

### unknownAST

    void unknownAST(AST node)

### variableDef

    Statement variableDef(AST variableDef)

### variableExpression

    Expression variableExpression(AST node)

### whileStatement

    Statement whileStatement(AST whileNode)