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 ASTastDeprecated.protected java.lang.String[]tokenNamesDeprecated.Fields inherited from class org.codehaus.groovy.syntax.ASTHelper
output, resolutionsFields 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 booleanaddArgumentExpression(AST node, java.util.List<Expression> expressionList)Deprecated.protected AnnotationNodeannotation(AST annotationNode)Deprecated.protected voidannotationDef(AST classDef)Deprecated.protected ExpressionanonymousInnerClassDef(AST node)Deprecated.protected Expressionarguments(AST elist)Deprecated.protected java.util.List<Expression>arraySizeExpression(AST node)Deprecated.protected ExpressionasExpression(AST node)Deprecated.protected voidassertNodeType(int type, AST node)Deprecated.protected StatementassertStatement(AST assertNode)Deprecated.protected voidassertTypeNotNull(ClassNode type, AST rightNode)Deprecated.protected ExpressionbinaryExpression(int type, AST node)Deprecated.protected ExpressionblockExpression(AST node)Deprecated.protected BooleanExpressionbooleanExpression(AST node)Deprecated.protected StatementbreakStatement(AST node)Deprecated.ModuleNodebuildAST(SourceUnit sourceUnit, java.lang.ClassLoader classLoader, Reduction cst)Deprecated.protected ClassNodebuildName(AST node)Deprecated.protected StatementcaseStatements(AST node, java.util.List<CaseStatement> cases)Deprecated.protected ExpressioncastExpression(AST castNode)Deprecated.protected java.util.List<CatchStatement>catchStatement(AST catchNode)Deprecated.protected voidclassDef(AST classDef)Deprecated.protected ClosureExpressionclosureExpression(AST node)Deprecated.protected voidconfigureAST(ASTNode node, AST ast)Deprecated.protected ExpressionconstructorCallExpression(AST node)Deprecated.protected voidconstructorDef(AST constructorDef)Deprecated.protected StatementcontinueStatement(AST node)Deprecated.protected voidconvertGroovy(AST node)Deprecated.Converts the Antlr AST to the Groovy AST.protected ConstantExpressiondecimalExpression(AST node)Deprecated.protected ExpressiondeclarationExpression(AST variableDef)Deprecated.protected ExpressiondotExpression(AST node)Deprecated.protected voiddump(AST node)Deprecated.protected voiddumpTree(AST ast)Deprecated.protected ExpressiondynamicMemberExpression(AST dynamicMemberNode)Deprecated.protected ExpressionenumArguments(AST elist)Deprecated.protected voidenumConstantDef(AST node)Deprecated.protected voidenumDef(AST enumNode)Deprecated.protected Expressionexpression(AST node)Deprecated.protected Expressionexpression(AST node, boolean convertToConstant)Deprecated.protected ExpressionexpressionList(AST node)Deprecated.protected ExpressionexpressionSwitch(AST node)Deprecated.protected voidfieldDef(AST fieldDef)Deprecated.protected StatementforStatement(AST forNode)Deprecated.static ExpressiongetDefaultValueForPrimitive(ClassNode type)Deprecated.protected java.lang.StringgetFirstChildText(AST node)Deprecated.protected Expressiongstring(AST gstringNode)Deprecated.protected booleanhasVisibility(int modifiers)Deprecated.Returns true if the modifiers flags contain a visibility modifierprotected java.lang.Stringidentifier(AST node)Deprecated.Extracts an identifier from the Antlr ASTprotected StatementifStatement(AST ifNode)Deprecated.protected voidimportDef(AST importNode)Deprecated.protected ExpressionindexExpression(AST indexNode)Deprecated.protected voidinnerClassDef(AST classDef)Deprecated.protected voidinnerInterfaceDef(AST classDef)Deprecated.protected ExpressioninstanceofExpression(AST node)Deprecated.protected ConstantExpressionintegerExpression(AST node)Deprecated.protected voidinterfaceDef(AST classDef)Deprecated.protected ClassNode[]interfaces(AST node)Deprecated.protected booleanisPrimitiveTypeLiteral(AST node)Deprecated.static booleanisType(int typeCode, AST node)Deprecated.protected java.lang.Stringlabel(AST labelNode)Deprecated.protected StatementlabelledStatement(AST labelNode)Deprecated.protected ExpressionlistExpression(AST listNode)Deprecated.protected ConstantExpressionliteralExpression(AST node, java.lang.Object value)Deprecated.protected GenericsType[]makeGenericsType(AST rootNode)Deprecated.protected static TokenmakeToken(int typeCode, AST node)Deprecated.protected ClassNodemakeType(AST typeNode)Deprecated.protected ClassNodemakeTypeWithArguments(AST rootNode)Deprecated.protected MapEntryExpressionmapEntryExpression(AST node)Deprecated.protected ExpressionmapExpression(AST mapNode)Deprecated.protected StatementmethodCall(AST code)Deprecated.protected ExpressionmethodCallExpression(AST methodCallNode)Deprecated.protected voidmethodDef(AST methodDef)Deprecated.protected ExpressionmethodPointerExpression(AST node)Deprecated.protected intmodifiers(AST modifierNode, java.util.List<AnnotationNode> annotations, int defaultModifiers)Deprecated.protected voidnotImplementedYet(AST node)Deprecated.protected voidobjectBlock(AST objectBlock)Deprecated.protected voidobjectInit(AST init)Deprecated.ReductionoutputAST(SourceUnit sourceUnit, SourceBuffer sourceBuffer)Deprecated.protected voidpackageDef(AST packageDef)Deprecated.protected Parameterparameter(AST paramNode)Deprecated.protected Parameter[]parameters(AST parametersNode)Deprecated.ReductionparseCST(SourceUnit sourceUnit, java.io.Reader reader)Deprecated.protected ExpressionpostfixExpression(AST node, int token)Deprecated.protected ExpressionprefixExpression(AST node, int token)Deprecated.protected voidprocessAST()Deprecated.static java.lang.StringqualifiedName(AST qualifiedNameNode)Deprecated.protected ExpressionrangeExpression(AST rangeNode, boolean inclusive)Deprecated.protected StatementreturnStatement(AST node)Deprecated.protected booleansetAccessTrue(AST node, boolean access)Deprecated.protected intsetModifierBit(AST node, int answer, int bit)Deprecated.protected ExpressionspecialConstructorCallExpression(AST methodCallNode, ClassNode special)Deprecated.protected ExpressionspreadExpression(AST node)Deprecated.protected ExpressionspreadMapExpression(AST node)Deprecated.protected Statementstatement(AST node)Deprecated.protected StatementstatementList(AST code)Deprecated.protected StatementstatementListNoChild(AST node, AST alternativeConfigureNode)Deprecated.protected voidstaticInit(AST staticInit)Deprecated.protected StatementswitchStatement(AST switchNode)Deprecated.protected StatementsynchronizedStatement(AST syncNode)Deprecated.protected ExpressionternaryExpression(AST ternaryNode)Deprecated.protected voidthrowsList(AST node, java.util.List<ClassNode> list)Deprecated.protected StatementthrowStatement(AST node)Deprecated.protected voidtransformCSTIntoAST(SourceUnit sourceUnit, java.io.Reader reader, SourceBuffer sourceBuffer)Deprecated.protected StatementtryStatement(AST tryStatementNode)Deprecated.protected ExpressionunaryMinusExpression(AST unaryMinusExpr)Deprecated.protected ExpressionunaryPlusExpression(AST unaryPlusExpr)Deprecated.protected voidunknownAST(AST node)Deprecated.protected StatementvariableDef(AST variableDef)Deprecated.protected ExpressionvariableExpression(AST node)Deprecated.protected StatementwhileStatement(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, setPackageNameMethods 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:
parseCSTin 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:
buildASTin 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.
-