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