Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.antlr
[Java] Class AntlrParserPlugin

    java.lang.Object
      org.codehaus.groovy.syntax.ASTHelper
          org.codehaus.groovy.antlr.AntlrParserPlugin

All Implemented Interfaces:
  GroovyTokenTypes, ParserPlugin

    public class AntlrParserPlugin
    extends ASTHelper

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

Authors:
  James Strachan

Field Summary
`protected AST` | `ast`

Fields inherited from class ASTHelper
output, resolutions

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

Methods inherited from class ASTHelper
addImport, addImport, addStarImport, addStarImport, addStaticImport, addStaticImport, addStaticStarImport, addStaticStarImport, dot, dot, getClassLoader, getController, getPackageName, makeModule, setClassLoader, setController, setPackage, setPackageName

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### ast

    protected AST ast

Method Detail

### addArgumentExpression

    protected boolean addArgumentExpression(AST node, List expressionList)

### annotation

    protected AnnotationNode annotation(AST annotationNode)

### annotationDef

    protected void annotationDef(AST classDef)

### anonymousInnerClassDef

    protected Expression anonymousInnerClassDef(AST node)

### arguments

    protected Expression arguments(AST elist)

### arraySizeExpression

    protected List arraySizeExpression(AST node)

### asExpression

    protected Expression asExpression(AST node)

### assertNodeType

    protected void assertNodeType(int type, AST node)

### assertStatement

    protected Statement assertStatement(AST assertNode)

### assertTypeNotNull

    protected void assertTypeNotNull(ClassNode type, AST rightNode)

### binaryExpression

    protected Expression binaryExpression(int type, AST node)

### blockExpression

    protected Expression blockExpression(AST node)

### booleanExpression

    protected BooleanExpression booleanExpression(AST node)

### breakStatement

    protected Statement breakStatement(AST node)

### buildAST

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

### buildName

    protected ClassNode buildName(AST node)

  Performs a name resolution to see if the given name is a type from imports, aliases or newly created classes

### caseStatements

    protected Statement caseStatements(AST node, List cases)

### castExpression

    protected Expression castExpression(AST castNode)

### catchStatement

    protected CatchStatement catchStatement(AST catchNode)

### classDef

    protected void classDef(AST classDef)

### closureExpression

    protected ClosureExpression closureExpression(AST node)

### configureAST

    protected void configureAST(ASTNode node, AST ast)

### constructorCallExpression

    protected Expression constructorCallExpression(AST node)

### constructorDef

    protected void constructorDef(AST constructorDef)

### continueStatement

    protected Statement continueStatement(AST node)

### convertGroovy

    protected void convertGroovy(AST node)

  Converts the Antlr AST to the Groovy AST

### decimalExpression

    protected ConstantExpression decimalExpression(AST node)

### declarationExpression

    protected Expression declarationExpression(AST variableDef)

### dotExpression

    protected Expression dotExpression(AST node)

### dump

    protected void dump(AST node)

### dumpTree

    protected void dumpTree(AST ast)

### dynamicMemberExpression

    protected Expression dynamicMemberExpression(AST dynamicMemberNode)

### enumConstantDef

    protected void enumConstantDef(AST node)

### enumDef

    protected void enumDef(AST enumNode)

### expression

    protected Expression expression(AST node)

### expression

    protected Expression expression(AST node, boolean convertToConstant)

### expressionList

    protected Expression expressionList(AST node)

### expressionSwitch

    protected Expression expressionSwitch(AST node)

### fieldDef

    protected void fieldDef(AST fieldDef)

### forStatement

    protected Statement forStatement(AST forNode)

### getFirstChildText

    protected String getFirstChildText(AST node)

### gstring

    protected Expression gstring(AST gstringNode)

### hasVisibility

    protected boolean hasVisibility(int modifiers)

  Returns true if the modifiers flags contain a visibility modifier

### identifier

    protected String identifier(AST node)

  Extracts an identifier from the Antlr AST

### ifStatement

    protected Statement ifStatement(AST ifNode)

### importDef

    protected void importDef(AST importNode)

### indexExpression

    protected Expression indexExpression(AST indexNode)

### innerClassDef

    protected void innerClassDef(AST classDef)

### innerInterfaceDef

    protected void innerInterfaceDef(AST classDef)

### instanceofExpression

    protected Expression instanceofExpression(AST node)

### integerExpression

    protected ConstantExpression integerExpression(AST node)

### interfaceDef

    protected void interfaceDef(AST classDef)

### interfaces

    protected ClassNode[] interfaces(AST node)

### isPrimitiveTypeLiteral

    protected boolean isPrimitiveTypeLiteral(AST node)

### isType

    public static boolean isType(int typeCode, AST node)

### label

    protected String label(AST labelNode)

### labelledStatement

    protected Statement labelledStatement(AST labelNode)

### listExpression

    protected Expression listExpression(AST listNode)

### literalExpression

    protected Expression literalExpression(AST node, Object value)

### makeGenericsType

    protected GenericsType[] makeGenericsType(AST rootNode)

### makeToken

    protected static Token makeToken(int typeCode, AST node)

### makeType

    protected ClassNode makeType(AST typeNode)

### makeTypeWithArguments

    protected ClassNode makeTypeWithArguments(AST rootNode)

### mapEntryExpression

    protected MapEntryExpression mapEntryExpression(AST node)

### mapExpression

    protected Expression mapExpression(AST mapNode)

  Typically only used for map constructors I think?

### methodCall

    protected Statement methodCall(AST code)

### methodCallExpression

    protected Expression methodCallExpression(AST methodCallNode)

### methodDef

    protected void methodDef(AST methodDef)

### methodPointerExpression

    protected Expression methodPointerExpression(AST node)

### modifiers

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

### notImplementedYet

    protected void notImplementedYet(AST node)

### objectBlock

    protected void objectBlock(AST objectBlock)

### objectInit

    protected void objectInit(AST init)

### outputAST

    public Reduction outputAST(SourceUnit sourceUnit, SourceBuffer sourceBuffer)

### packageDef

    protected void packageDef(AST packageDef)

### parameter

    protected Parameter parameter(AST paramNode)

### parameters

    protected Parameter[] parameters(AST parametersNode)

### parseCST

    public Reduction parseCST(SourceUnit sourceUnit, Reader reader)

### postfixExpression

    protected Expression postfixExpression(AST node, int token)

### prefixExpression

    protected Expression prefixExpression(AST node, int token)

### processAST

    protected void processAST()

### qualifiedName

    public static String qualifiedName(AST qualifiedNameNode)

### rangeExpression

    protected Expression rangeExpression(AST rangeNode, boolean inclusive)

### returnStatement

    protected Statement returnStatement(AST node)

### setAccessTrue

    protected boolean setAccessTrue(AST node, boolean access)

### setModifierBit

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

### specialConstructorCallExpression

    protected Expression specialConstructorCallExpression(AST methodCallNode, ClassNode special)

### spreadExpression

    protected Expression spreadExpression(AST node)

### spreadMapExpression

    protected Expression spreadMapExpression(AST node)

### statement

    protected Statement statement(AST node)

### statementList

    protected Statement statementList(AST code)

### statementListNoChild

    protected Statement statementListNoChild(AST node, AST alternativeConfigureNode)

### staticInit

    protected void staticInit(AST staticInit)

### switchStatement

    protected Statement switchStatement(AST switchNode)

### synchronizedStatement

    protected Statement synchronizedStatement(AST syncNode)

### ternaryExpression

    protected Expression ternaryExpression(AST ternaryNode)

### throwStatement

    protected Statement throwStatement(AST node)

### throwsList

    protected void throwsList(AST node, List list)

### transformCSTIntoAST

    protected void transformCSTIntoAST(SourceUnit sourceUnit, Reader reader, SourceBuffer sourceBuffer)

### tryStatement

    protected Statement tryStatement(AST tryStatementNode)

### type

    protected ClassNode type(AST typeNode)

### unaryMinusExpression

    protected Expression unaryMinusExpression(AST unaryMinusExpr)

### unaryPlusExpression

    protected Expression unaryPlusExpression(AST unaryPlusExpr)

### unknownAST

    protected void unknownAST(AST node)

### variableDef

    protected Statement variableDef(AST variableDef)

### variableExpression

    protected Expression variableExpression(AST node)

### whileStatement

    protected Statement whileStatement(AST whileNode)

Copyright © 2003-2010 The Codehaus. All rights reserved.