|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.syntax.ASTHelper org.codehaus.groovy.antlr.AntlrParserPlugin
public class AntlrParserPlugin extends ASTHelper
A parser plugin which adapts the JSR Antlr Parser to the Groovy runtime
Field Summary | |
---|---|
protected AST |
ast
|
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)
|
protected Statement
|
caseStatements(AST node, List cases)
|
protected Expression
|
castExpression(AST castNode)
|
protected List
|
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 Expression
|
enumArguments(AST elist)
|
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)
|
protected String
|
identifier(AST node)
|
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)
Typically only used for map constructors I think? |
protected GenericsType[]
|
makeGenericsType(AST rootNode)
Extracts an identifier from the Antlr AST |
protected static Token
|
makeToken(int typeCode, AST node)
|
protected ClassNode
|
makeType(AST typeNode)
Returns true if the modifiers flags contain a visibility modifier |
protected ClassNode
|
makeTypeWithArguments(AST rootNode)
Performs a name resolution to see if the given name is a type from imports, aliases or newly created classes |
protected MapEntryExpression
|
mapEntryExpression(AST node)
|
protected Expression
|
mapExpression(AST mapNode)
|
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 | |
---|---|
dot, setPackage, setPackageName, getController, setController, getClassLoader, setClassLoader, getPackageName, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
protected AST ast
Method Detail |
---|
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)
public ModuleNode buildAST(SourceUnit sourceUnit, ClassLoader classLoader, Reduction cst)
protected ClassNode buildName(AST node)
protected Statement caseStatements(AST node, List cases)
protected Expression castExpression(AST castNode)
protected List 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)
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 Expression enumArguments(AST elist)
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)
protected String identifier(AST node)
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)
public 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)
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)
public Reduction outputAST(SourceUnit sourceUnit, SourceBuffer sourceBuffer)
protected void packageDef(AST packageDef)
protected Parameter parameter(AST paramNode)
protected Parameter[] parameters(AST parametersNode)
public Reduction parseCST(SourceUnit sourceUnit, Reader reader)
protected Expression postfixExpression(AST node, int token)
protected Expression prefixExpression(AST node, int token)
protected void processAST()
public 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)
Copyright © 2003-2013 The Codehaus. All rights reserved.