Package org.codehaus.groovy.antlr
Class AntlrParserPlugin
- java.lang.Object
-
- org.codehaus.groovy.syntax.ASTHelper
-
- org.codehaus.groovy.antlr.AntlrParserPlugin
-
- All Implemented Interfaces:
GroovyTokenTypes
,ParserPlugin
@Deprecated public class AntlrParserPlugin extends ASTHelper implements ParserPlugin, GroovyTokenTypes
Deprecated.A parser plugin which adapts the JSR Antlr Parser to the Groovy runtime.
-
-
Field Summary
Fields Modifier and Type Field Description protected AST
ast
Deprecated.protected String[]
tokenNames
Deprecated.-
Fields inherited from class org.codehaus.groovy.syntax.ASTHelper
output, resolutions
-
Fields inherited from interface org.codehaus.groovy.antlr.parser.GroovyTokenTypes
ABSTRACT, ANNOTATION, ANNOTATION_ARRAY_INIT, ANNOTATION_DEF, ANNOTATION_FIELD_DEF, ANNOTATION_MEMBER_VALUE_PAIR, ANNOTATIONS, ARRAY_DECLARATOR, ASSIGN, AT, BAND, BAND_ASSIGN, BIG_SUFFIX, BLOCK, BNOT, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, CASE_GROUP, CLASS_DEF, CLOSABLE_BLOCK, CLOSABLE_BLOCK_OP, CLOSURE_LIST, COLON, COMMA, COMPARE_TO, CTOR_CALL, CTOR_IDENT, DEC, DIGIT, DIGITS_WITH_UNDERSCORE, DIGITS_WITH_UNDERSCORE_OPT, DIV, DIV_ASSIGN, DOLLAR, DOLLAR_REGEXP_CTOR_END, DOLLAR_REGEXP_LITERAL, DOLLAR_REGEXP_SYMBOL, DOT, DYNAMIC_MEMBER, ELIST, ELVIS_OPERATOR, EMPTY_STAT, ENUM_CONSTANT_DEF, ENUM_DEF, EOF, EQUAL, ESC, ESCAPED_DOLLAR, ESCAPED_SLASH, EXPONENT, EXPR, EXTENDS_CLAUSE, FINAL, FLOAT_SUFFIX, FOR_CONDITION, FOR_EACH_CLAUSE, FOR_IN_ITERABLE, FOR_INIT, FOR_ITERATOR, GE, GT, HEX_DIGIT, IDENT, IDENTICAL, IMPLEMENTS_CLAUSE, IMPLICIT_PARAMETERS, IMPORT, INC, INDEX_OP, INSTANCE_INIT, INTERFACE_DEF, LABELED_ARG, LABELED_STAT, LAND, LBRACK, LCURLY, LE, LETTER, LIST_CONSTRUCTOR, LITERAL_as, LITERAL_assert, LITERAL_boolean, LITERAL_break, LITERAL_byte, LITERAL_case, LITERAL_catch, LITERAL_char, LITERAL_class, LITERAL_continue, LITERAL_def, LITERAL_default, LITERAL_double, LITERAL_else, LITERAL_enum, LITERAL_extends, LITERAL_false, LITERAL_finally, LITERAL_float, LITERAL_for, LITERAL_if, LITERAL_implements, LITERAL_import, LITERAL_in, LITERAL_instanceof, LITERAL_int, LITERAL_interface, LITERAL_long, LITERAL_native, LITERAL_new, LITERAL_null, LITERAL_package, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_return, LITERAL_short, LITERAL_static, LITERAL_super, LITERAL_switch, LITERAL_synchronized, LITERAL_this, LITERAL_threadsafe, LITERAL_throw, LITERAL_throws, LITERAL_trait, LITERAL_transient, LITERAL_true, LITERAL_try, LITERAL_void, LITERAL_volatile, LITERAL_while, LNOT, LOR, LPAREN, LT, MAP_CONSTRUCTOR, MEMBER_POINTER, METHOD_CALL, METHOD_DEF, MINUS, MINUS_ASSIGN, ML_COMMENT, MOD, MOD_ASSIGN, MODIFIERS, MULTICATCH, MULTICATCH_TYPES, NLS, NOT_EQUAL, NOT_IDENTICAL, NULL_TREE_LOOKAHEAD, NUM_BIG_DECIMAL, NUM_BIG_INT, NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG, OBJBLOCK, ONE_NL, OPTIONAL_DOT, PACKAGE_DEF, PARAMETER_DEF, PARAMETERS, PLUS, PLUS_ASSIGN, POST_DEC, POST_INC, QUESTION, RANGE_EXCLUSIVE, RANGE_INCLUSIVE, RBRACK, RCURLY, REGEX_FIND, REGEX_MATCH, REGEXP_CTOR_END, REGEXP_LITERAL, REGEXP_SYMBOL, RPAREN, SELECT_SLOT, SEMI, SH_COMMENT, SL, SL_ASSIGN, SL_COMMENT, SLIST, SPREAD_ARG, SPREAD_DOT, SPREAD_MAP_ARG, SR, SR_ASSIGN, STAR, STAR_ASSIGN, STAR_STAR, STAR_STAR_ASSIGN, STATIC_IMPORT, STATIC_INIT, STRICTFP, STRING_CH, STRING_CONSTRUCTOR, STRING_CTOR_END, STRING_CTOR_MIDDLE, STRING_CTOR_START, STRING_LITERAL, STRING_NL, SUPER_CTOR_CALL, TRAIT_DEF, TRIPLE_DOT, TYPE, TYPE_ARGUMENT, TYPE_ARGUMENTS, TYPE_LOWER_BOUNDS, TYPE_PARAMETER, TYPE_PARAMETERS, TYPE_UPPER_BOUNDS, TYPECAST, UNARY_MINUS, UNARY_PLUS, UNUSED_CONST, UNUSED_DO, UNUSED_GOTO, VARIABLE_DEF, VARIABLE_PARAMETER_DEF, VOCAB, WILDCARD_TYPE, WS
-
-
Constructor Summary
Constructors Constructor Description AntlrParserPlugin()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected boolean
addArgumentExpression(AST node, List<Expression> expressionList)
Deprecated.protected AnnotationNode
annotation(AST annotationNode)
Deprecated.protected void
annotationDef(AST classDef)
Deprecated.protected Expression
anonymousInnerClassDef(AST node)
Deprecated.protected Expression
arguments(AST elist)
Deprecated.protected List<Expression>
arraySizeExpression(AST node)
Deprecated.protected Expression
asExpression(AST node)
Deprecated.protected void
assertNodeType(int type, AST node)
Deprecated.protected Statement
assertStatement(AST assertNode)
Deprecated.protected void
assertTypeNotNull(ClassNode type, AST rightNode)
Deprecated.protected Expression
binaryExpression(int type, AST node)
Deprecated.protected Expression
blockExpression(AST node)
Deprecated.protected BooleanExpression
booleanExpression(AST node)
Deprecated.protected Statement
breakStatement(AST node)
Deprecated.ModuleNode
buildAST(SourceUnit sourceUnit, ClassLoader classLoader, Reduction cst)
Deprecated.protected ClassNode
buildName(AST node)
Deprecated.protected Statement
caseStatements(AST node, List<CaseStatement> cases)
Deprecated.protected Expression
castExpression(AST castNode)
Deprecated.protected List<CatchStatement>
catchStatement(AST catchNode)
Deprecated.protected void
classDef(AST classDef)
Deprecated.protected ClosureExpression
closureExpression(AST node)
Deprecated.protected void
configureAST(ASTNode node, AST ast)
Deprecated.protected Expression
constructorCallExpression(AST node)
Deprecated.protected void
constructorDef(AST constructorDef)
Deprecated.protected Statement
continueStatement(AST node)
Deprecated.protected void
convertGroovy(AST node)
Deprecated.Converts the Antlr AST to the Groovy AST.protected ConstantExpression
decimalExpression(AST node)
Deprecated.protected Expression
declarationExpression(AST variableDef)
Deprecated.protected Expression
dotExpression(AST node)
Deprecated.protected void
dump(AST node)
Deprecated.protected void
dumpTree(AST ast)
Deprecated.protected Expression
dynamicMemberExpression(AST dynamicMemberNode)
Deprecated.protected Expression
enumArguments(AST elist)
Deprecated.protected void
enumConstantDef(AST node)
Deprecated.protected void
enumDef(AST enumNode)
Deprecated.protected Expression
expression(AST node)
Deprecated.protected Expression
expression(AST node, boolean convertToConstant)
Deprecated.protected Expression
expressionList(AST node)
Deprecated.protected Expression
expressionSwitch(AST node)
Deprecated.protected void
fieldDef(AST fieldDef)
Deprecated.protected Statement
forStatement(AST forNode)
Deprecated.static Expression
getDefaultValueForPrimitive(ClassNode type)
Deprecated.protected String
getFirstChildText(AST node)
Deprecated.protected Expression
gstring(AST gstringNode)
Deprecated.protected boolean
hasVisibility(int modifiers)
Deprecated.Returns true if the modifiers flags contain a visibility modifierprotected String
identifier(AST node)
Deprecated.Extracts an identifier from the Antlr ASTprotected Statement
ifStatement(AST ifNode)
Deprecated.protected void
importDef(AST importNode)
Deprecated.protected Expression
indexExpression(AST indexNode)
Deprecated.protected void
innerClassDef(AST classDef)
Deprecated.protected void
innerInterfaceDef(AST classDef)
Deprecated.protected Expression
instanceofExpression(AST node)
Deprecated.protected ConstantExpression
integerExpression(AST node)
Deprecated.protected void
interfaceDef(AST classDef)
Deprecated.protected ClassNode[]
interfaces(AST node)
Deprecated.protected boolean
isPrimitiveTypeLiteral(AST node)
Deprecated.static boolean
isType(int typeCode, AST node)
Deprecated.protected String
label(AST labelNode)
Deprecated.protected Statement
labelledStatement(AST labelNode)
Deprecated.protected Expression
listExpression(AST listNode)
Deprecated.protected ConstantExpression
literalExpression(AST node, Object value)
Deprecated.protected GenericsType[]
makeGenericsType(AST rootNode)
Deprecated.protected static Token
makeToken(int typeCode, AST node)
Deprecated.protected ClassNode
makeType(AST typeNode)
Deprecated.protected ClassNode
makeTypeWithArguments(AST rootNode)
Deprecated.protected MapEntryExpression
mapEntryExpression(AST node)
Deprecated.protected Expression
mapExpression(AST mapNode)
Deprecated.protected Statement
methodCall(AST code)
Deprecated.protected Expression
methodCallExpression(AST methodCallNode)
Deprecated.protected void
methodDef(AST methodDef)
Deprecated.protected Expression
methodPointerExpression(AST node)
Deprecated.protected int
modifiers(AST modifierNode, List<AnnotationNode> annotations, int defaultModifiers)
Deprecated.protected void
notImplementedYet(AST node)
Deprecated.protected void
objectBlock(AST objectBlock)
Deprecated.protected void
objectInit(AST init)
Deprecated.Reduction
outputAST(SourceUnit sourceUnit, SourceBuffer sourceBuffer)
Deprecated.protected void
packageDef(AST packageDef)
Deprecated.protected Parameter
parameter(AST paramNode)
Deprecated.protected Parameter[]
parameters(AST parametersNode)
Deprecated.Reduction
parseCST(SourceUnit sourceUnit, Reader reader)
Deprecated.protected Expression
postfixExpression(AST node, int token)
Deprecated.protected Expression
prefixExpression(AST node, int token)
Deprecated.protected void
processAST()
Deprecated.static String
qualifiedName(AST qualifiedNameNode)
Deprecated.protected Expression
rangeExpression(AST rangeNode, boolean inclusive)
Deprecated.protected Statement
returnStatement(AST node)
Deprecated.protected boolean
setAccessTrue(AST node, boolean access)
Deprecated.protected int
setModifierBit(AST node, int answer, int bit)
Deprecated.protected Expression
specialConstructorCallExpression(AST methodCallNode, ClassNode special)
Deprecated.protected Expression
spreadExpression(AST node)
Deprecated.protected Expression
spreadMapExpression(AST node)
Deprecated.protected Statement
statement(AST node)
Deprecated.protected Statement
statementList(AST code)
Deprecated.protected Statement
statementListNoChild(AST node, AST alternativeConfigureNode)
Deprecated.protected void
staticInit(AST staticInit)
Deprecated.protected Statement
switchStatement(AST switchNode)
Deprecated.protected Statement
synchronizedStatement(AST syncNode)
Deprecated.protected Expression
ternaryExpression(AST ternaryNode)
Deprecated.protected void
throwsList(AST node, List<ClassNode> list)
Deprecated.protected Statement
throwStatement(AST node)
Deprecated.protected void
transformCSTIntoAST(SourceUnit sourceUnit, Reader reader, SourceBuffer sourceBuffer)
Deprecated.protected Statement
tryStatement(AST tryStatementNode)
Deprecated.protected Expression
unaryMinusExpression(AST unaryMinusExpr)
Deprecated.protected Expression
unaryPlusExpression(AST unaryPlusExpr)
Deprecated.protected void
unknownAST(AST node)
Deprecated.protected Statement
variableDef(AST variableDef)
Deprecated.protected Expression
variableExpression(AST node)
Deprecated.protected Statement
whileStatement(AST whileNode)
Deprecated.-
Methods inherited from class org.codehaus.groovy.syntax.ASTHelper
addImport, addImport, addStarImport, addStarImport, addStaticImport, addStaticImport, addStaticStarImport, addStaticStarImport, dot, dot, getClassLoader, getController, getPackageName, makeModule, setClassLoader, setController, setPackage, setPackageName
-
-
-
-
Method Detail
-
parseCST
public Reduction parseCST(SourceUnit sourceUnit, Reader reader) throws CompilationFailedException
Deprecated.- Specified by:
parseCST
in interfaceParserPlugin
- Throws:
CompilationFailedException
-
transformCSTIntoAST
protected void transformCSTIntoAST(SourceUnit sourceUnit, Reader reader, SourceBuffer sourceBuffer) throws CompilationFailedException
Deprecated.- Throws:
CompilationFailedException
-
processAST
protected void processAST()
Deprecated.
-
outputAST
public Reduction outputAST(SourceUnit sourceUnit, SourceBuffer sourceBuffer)
Deprecated.
-
buildAST
public ModuleNode buildAST(SourceUnit sourceUnit, ClassLoader classLoader, Reduction cst) throws ParserException
Deprecated.- Specified by:
buildAST
in interfaceParserPlugin
- Throws:
ParserException
-
convertGroovy
protected void convertGroovy(AST node)
Deprecated.Converts the Antlr AST to the Groovy AST.
-
packageDef
protected void packageDef(AST packageDef)
Deprecated.
-
importDef
protected void importDef(AST importNode)
Deprecated.
-
annotationDef
protected void annotationDef(AST classDef)
Deprecated.
-
interfaceDef
protected void interfaceDef(AST classDef)
Deprecated.
-
innerInterfaceDef
protected void innerInterfaceDef(AST classDef)
Deprecated.
-
classDef
protected void classDef(AST classDef)
Deprecated.
-
anonymousInnerClassDef
protected Expression anonymousInnerClassDef(AST node)
Deprecated.
-
innerClassDef
protected void innerClassDef(AST classDef)
Deprecated.
-
objectBlock
protected void objectBlock(AST objectBlock)
Deprecated.
-
enumDef
protected void enumDef(AST enumNode)
Deprecated.
-
enumConstantDef
protected void enumConstantDef(AST node)
Deprecated.
-
methodDef
protected void methodDef(AST methodDef)
Deprecated.
-
staticInit
protected void staticInit(AST staticInit)
Deprecated.
-
objectInit
protected void objectInit(AST init)
Deprecated.
-
constructorDef
protected void constructorDef(AST constructorDef)
Deprecated.
-
fieldDef
protected void fieldDef(AST fieldDef)
Deprecated.
-
getDefaultValueForPrimitive
@Deprecated public static Expression getDefaultValueForPrimitive(ClassNode type)
Deprecated.
-
modifiers
protected int modifiers(AST modifierNode, List<AnnotationNode> annotations, int defaultModifiers)
Deprecated.
-
setAccessTrue
protected boolean setAccessTrue(AST node, boolean access)
Deprecated.
-
setModifierBit
protected int setModifierBit(AST node, int answer, int bit)
Deprecated.
-
annotation
protected AnnotationNode annotation(AST annotationNode)
Deprecated.
-
statementListNoChild
protected Statement statementListNoChild(AST node, AST alternativeConfigureNode)
Deprecated.
-
declarationExpression
protected Expression declarationExpression(AST variableDef)
Deprecated.
-
caseStatements
protected Statement caseStatements(AST node, List<CaseStatement> cases)
Deprecated.
-
catchStatement
protected List<CatchStatement> catchStatement(AST catchNode)
Deprecated.
-
expression
protected Expression expression(AST node)
Deprecated.
-
expression
protected Expression expression(AST node, boolean convertToConstant)
Deprecated.
-
expressionSwitch
protected Expression expressionSwitch(AST node)
Deprecated.
-
dynamicMemberExpression
protected Expression dynamicMemberExpression(AST dynamicMemberNode)
Deprecated.
-
ternaryExpression
protected Expression ternaryExpression(AST ternaryNode)
Deprecated.
-
variableExpression
protected Expression variableExpression(AST node)
Deprecated.
-
literalExpression
protected ConstantExpression literalExpression(AST node, Object value)
Deprecated.
-
rangeExpression
protected Expression rangeExpression(AST rangeNode, boolean inclusive)
Deprecated.
-
spreadExpression
protected Expression spreadExpression(AST node)
Deprecated.
-
spreadMapExpression
protected Expression spreadMapExpression(AST node)
Deprecated.
-
methodPointerExpression
protected Expression methodPointerExpression(AST node)
Deprecated.
-
listExpression
protected Expression listExpression(AST listNode)
Deprecated.
-
mapExpression
protected Expression mapExpression(AST mapNode)
Deprecated.
-
mapEntryExpression
protected MapEntryExpression mapEntryExpression(AST node)
Deprecated.
-
instanceofExpression
protected Expression instanceofExpression(AST node)
Deprecated.
-
asExpression
protected Expression asExpression(AST node)
Deprecated.
-
castExpression
protected Expression castExpression(AST castNode)
Deprecated.
-
indexExpression
protected Expression indexExpression(AST indexNode)
Deprecated.
-
binaryExpression
protected Expression binaryExpression(int type, AST node)
Deprecated.
-
prefixExpression
protected Expression prefixExpression(AST node, int token)
Deprecated.
-
postfixExpression
protected Expression postfixExpression(AST node, int token)
Deprecated.
-
booleanExpression
protected BooleanExpression booleanExpression(AST node)
Deprecated.
-
dotExpression
protected Expression dotExpression(AST node)
Deprecated.
-
specialConstructorCallExpression
protected Expression specialConstructorCallExpression(AST methodCallNode, ClassNode special)
Deprecated.
-
methodCallExpression
protected Expression methodCallExpression(AST methodCallNode)
Deprecated.
-
constructorCallExpression
protected Expression constructorCallExpression(AST node)
Deprecated.
-
arraySizeExpression
protected List<Expression> arraySizeExpression(AST node)
Deprecated.
-
enumArguments
protected Expression enumArguments(AST elist)
Deprecated.
-
arguments
protected Expression arguments(AST elist)
Deprecated.
-
addArgumentExpression
protected boolean addArgumentExpression(AST node, List<Expression> expressionList)
Deprecated.
-
expressionList
protected Expression expressionList(AST node)
Deprecated.
-
closureExpression
protected ClosureExpression closureExpression(AST node)
Deprecated.
-
blockExpression
protected Expression blockExpression(AST node)
Deprecated.
-
unaryMinusExpression
protected Expression unaryMinusExpression(AST unaryMinusExpr)
Deprecated.
-
unaryPlusExpression
protected Expression unaryPlusExpression(AST unaryPlusExpr)
Deprecated.
-
decimalExpression
protected ConstantExpression decimalExpression(AST node)
Deprecated.
-
integerExpression
protected ConstantExpression integerExpression(AST node)
Deprecated.
-
gstring
protected Expression gstring(AST gstringNode)
Deprecated.
-
makeGenericsType
protected GenericsType[] makeGenericsType(AST rootNode)
Deprecated.
-
isPrimitiveTypeLiteral
protected boolean isPrimitiveTypeLiteral(AST node)
Deprecated.
-
identifier
protected String identifier(AST node)
Deprecated.Extracts an identifier from the Antlr AST
-
hasVisibility
protected boolean hasVisibility(int modifiers)
Deprecated.Returns true if the modifiers flags contain a visibility modifier
-
isType
public static boolean isType(int typeCode, AST node)
Deprecated.
-
assertNodeType
protected void assertNodeType(int type, AST node)
Deprecated.
-
notImplementedYet
protected void notImplementedYet(AST node)
Deprecated.
-
unknownAST
protected void unknownAST(AST node)
Deprecated.
-
dumpTree
protected void dumpTree(AST ast)
Deprecated.
-
dump
protected void dump(AST node)
Deprecated.
-
-