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 java.lang.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
Modifier and Type Method Description protected boolean
addArgumentExpression(AST node, java.util.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 java.util.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, java.lang.ClassLoader classLoader, Reduction cst)
Deprecated.protected ClassNode
buildName(AST node)
Deprecated.protected Statement
caseStatements(AST node, java.util.List<CaseStatement> cases)
Deprecated.protected Expression
castExpression(AST castNode)
Deprecated.protected java.util.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 java.lang.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 java.lang.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 java.lang.String
label(AST labelNode)
Deprecated.protected Statement
labelledStatement(AST labelNode)
Deprecated.protected Expression
listExpression(AST listNode)
Deprecated.protected ConstantExpression
literalExpression(AST node, java.lang.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, java.util.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, java.io.Reader reader)
Deprecated.protected Expression
postfixExpression(AST node, int token)
Deprecated.protected Expression
prefixExpression(AST node, int token)
Deprecated.protected void
processAST()
Deprecated.static java.lang.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, java.util.List<ClassNode> list)
Deprecated.protected Statement
throwStatement(AST node)
Deprecated.protected void
transformCSTIntoAST(SourceUnit sourceUnit, java.io.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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
ast
Deprecated. -
tokenNames
protected java.lang.String[] tokenNamesDeprecated.
-
-
Constructor Details
-
AntlrParserPlugin
public AntlrParserPlugin()Deprecated.
-
-
Method Details
-
parseCST
public Reduction parseCST(SourceUnit sourceUnit, java.io.Reader reader) throws CompilationFailedExceptionDeprecated.- Specified by:
parseCST
in interfaceParserPlugin
- Throws:
CompilationFailedException
-
transformCSTIntoAST
protected void transformCSTIntoAST(SourceUnit sourceUnit, java.io.Reader reader, SourceBuffer sourceBuffer) throws CompilationFailedExceptionDeprecated.- Throws:
CompilationFailedException
-
processAST
protected void processAST()Deprecated. -
outputAST
Deprecated. -
buildAST
public ModuleNode buildAST(SourceUnit sourceUnit, java.lang.ClassLoader classLoader, Reduction cst) throws ParserExceptionDeprecated.- Specified by:
buildAST
in interfaceParserPlugin
- Throws:
ParserException
-
convertGroovy
Deprecated.Converts the Antlr AST to the Groovy AST. -
packageDef
Deprecated. -
importDef
Deprecated. -
annotationDef
Deprecated. -
interfaceDef
Deprecated. -
innerInterfaceDef
Deprecated. -
classDef
Deprecated. -
anonymousInnerClassDef
Deprecated. -
innerClassDef
Deprecated. -
objectBlock
Deprecated. -
enumDef
Deprecated. -
enumConstantDef
Deprecated. -
throwsList
Deprecated. -
methodDef
Deprecated. -
staticInit
Deprecated. -
objectInit
Deprecated. -
constructorDef
Deprecated. -
fieldDef
Deprecated. -
getDefaultValueForPrimitive
Deprecated. -
interfaces
Deprecated. -
parameters
Deprecated. -
parameter
Deprecated. -
modifiers
protected int modifiers(AST modifierNode, java.util.List<AnnotationNode> annotations, int defaultModifiers)Deprecated. -
setAccessTrue
Deprecated. -
setModifierBit
Deprecated. -
annotation
Deprecated. -
statement
Deprecated. -
statementList
Deprecated. -
statementListNoChild
Deprecated. -
assertStatement
Deprecated. -
breakStatement
Deprecated. -
continueStatement
Deprecated. -
forStatement
Deprecated. -
ifStatement
Deprecated. -
labelledStatement
Deprecated. -
methodCall
Deprecated. -
declarationExpression
Deprecated. -
variableDef
Deprecated. -
returnStatement
Deprecated. -
switchStatement
Deprecated. -
caseStatements
Deprecated. -
synchronizedStatement
Deprecated. -
throwStatement
Deprecated. -
tryStatement
Deprecated. -
catchStatement
Deprecated. -
whileStatement
Deprecated. -
expression
Deprecated. -
expression
Deprecated. -
expressionSwitch
Deprecated. -
dynamicMemberExpression
Deprecated. -
ternaryExpression
Deprecated. -
variableExpression
Deprecated. -
literalExpression
Deprecated. -
rangeExpression
Deprecated. -
spreadExpression
Deprecated. -
spreadMapExpression
Deprecated. -
methodPointerExpression
Deprecated. -
listExpression
Deprecated. -
mapExpression
Deprecated. -
mapEntryExpression
Deprecated. -
instanceofExpression
Deprecated. -
assertTypeNotNull
Deprecated. -
asExpression
Deprecated. -
castExpression
Deprecated. -
indexExpression
Deprecated. -
binaryExpression
Deprecated. -
prefixExpression
Deprecated. -
postfixExpression
Deprecated. -
booleanExpression
Deprecated. -
dotExpression
Deprecated. -
specialConstructorCallExpression
Deprecated. -
methodCallExpression
Deprecated. -
constructorCallExpression
Deprecated. -
arraySizeExpression
Deprecated. -
enumArguments
Deprecated. -
arguments
Deprecated. -
addArgumentExpression
Deprecated. -
expressionList
Deprecated. -
closureExpression
Deprecated. -
blockExpression
Deprecated. -
unaryMinusExpression
Deprecated. -
unaryPlusExpression
Deprecated. -
decimalExpression
Deprecated. -
integerExpression
Deprecated. -
gstring
Deprecated. -
qualifiedName
Deprecated. -
makeTypeWithArguments
Deprecated. -
makeGenericsType
Deprecated. -
makeType
Deprecated. -
buildName
Deprecated. -
isPrimitiveTypeLiteral
Deprecated. -
identifier
Deprecated.Extracts an identifier from the Antlr AST -
label
Deprecated. -
hasVisibility
protected boolean hasVisibility(int modifiers)Deprecated.Returns true if the modifiers flags contain a visibility modifier -
configureAST
Deprecated. -
makeToken
Deprecated. -
getFirstChildText
Deprecated. -
isType
Deprecated. -
assertNodeType
Deprecated. -
notImplementedYet
Deprecated. -
unknownAST
Deprecated. -
dumpTree
Deprecated. -
dump
Deprecated.
-