public class JavaRecognizer extends antlrLLkParser implements JavaTokenTypes
Java 1.5 Recognizer
Run 'java Main [-showtree] directory-full-of-java-files'
[The -showtree option pops up a Swing frame that shows
the AST constructed from the parser.]
Run 'java Main
Constructor and description |
---|
protected JavaRecognizer
(TokenBuffer tokenBuf, int k) |
JavaRecognizer
(TokenBuffer tokenBuf) |
protected JavaRecognizer
(TokenStream lexer, int k) |
JavaRecognizer
(TokenStream lexer) |
JavaRecognizer
(ParserSharedInputState state) |
Type Params | Return Type | Name and description |
---|---|---|
|
public final void |
aCase() |
|
public final void |
additiveExpression() |
|
public final void |
andExpression() |
|
public final void |
annotation() |
|
public final void |
annotationArguments() |
|
public final void |
annotationBlock() |
|
public final void |
annotationDefinition(AST modifiers) |
|
public final void |
annotationField() |
|
public final void |
annotationMemberArrayInitializer() |
|
public final void |
annotationMemberArrayValueInitializer() |
|
public final void |
annotationMemberValueInitializer() |
|
public final void |
annotationMemberValuePair() |
|
public final void |
annotationMemberValuePairs() |
|
public final void |
annotations() |
|
public final void |
argList() |
|
public final void |
arrayInitializer() |
|
public final void |
assignmentExpression() |
|
protected void |
buildTokenTypeASTClassMap() |
|
public final void |
builtInType() |
|
public final void |
builtInTypeArraySpec(boolean addImagNode) |
|
public final void |
builtInTypeSpec(boolean addImagNode) |
|
public final void |
caseSList() |
|
public final void |
casesGroup() |
|
public final void |
classBlock() |
|
public final void |
classDefinition(AST modifiers) |
|
public final void |
classField() |
|
public final void |
classOrInterfaceType(boolean addImagNode) |
|
public final void |
classTypeSpec(boolean addImagNode) |
|
public final void |
compilationUnit() |
|
public final void |
compoundStatement() |
|
public final void |
conditionalExpression() |
|
public final void |
constant() |
|
public final void |
constructorBody() |
|
public AST |
create(int type, String txt, Token first, Token last) Create an AST node with the token type and text passed in, but with the same background information as another supplied Token (e.g. line numbers) to be used in place of antlr tree construction syntax, i.e. |
|
public final void |
ctorHead() |
|
public final void |
declaration() |
|
public final void |
declaratorBrackets(AST typ) |
|
public final void |
enumBlock() |
|
public final void |
enumConstant() |
|
public final void |
enumConstantBlock() |
|
public final void |
enumConstantField() |
|
public final void |
enumDefinition(AST modifiers) |
|
public final void |
equalityExpression() |
|
public final void |
exclusiveOrExpression() |
|
public final void |
explicitConstructorInvocation() Catch obvious constructor calls, but not the expr.super(...) calls |
|
public final void |
expression() |
|
public final void |
expressionList() |
|
public final void |
finallyClause() |
|
public final void |
forCond() |
|
public final void |
forEachClause() |
|
public final void |
forInit() |
|
public final void |
forIter() |
|
public final void |
forStatement() |
|
public JavaLexer |
getLexer() |
|
public final void |
handler() |
|
public final void |
identPrimary() Match a, a.b.c refs, a.b.c(...) refs, a.b.c[], a.b.c[].class, and a.b.c.class refs. |
|
public final void |
identifier() |
|
public final void |
identifierStar() |
|
public final void |
implementsClause() |
|
public final void |
importDefinition() |
|
public final void |
inclusiveOrExpression() |
|
public final void |
initializer() |
|
public final void |
interfaceBlock() |
|
public final void |
interfaceDefinition(AST modifiers) |
|
public final void |
interfaceExtends() |
|
public final void |
interfaceField() |
|
public final void |
logicalAndExpression() |
|
public final void |
logicalOrExpression() |
|
public static JavaRecognizer |
make(JavaLexer lexer) This factory is the correct way to wire together a Groovy parser and lexer. |
|
public static JavaRecognizer |
make(InputStream in) |
|
public static JavaRecognizer |
make(Reader in) |
|
public static JavaRecognizer |
make(InputBuffer in) |
|
public static JavaRecognizer |
make(LexerSharedInputState in) |
|
public final void |
modifier() |
|
public final void |
modifiers() |
|
public final void |
multicatch() |
|
public final void |
multicatch_types() |
|
public final void |
multiplicativeExpression() |
|
public final void |
newArrayDeclarator() |
|
public final void |
newExpression() object instantiation. |
|
public final void |
packageDefinition() |
|
public final void |
parameterDeclaration() |
|
public final void |
parameterDeclarationList() |
|
public final void |
parameterModifier() |
|
public final void |
postfixExpression() |
|
public final void |
primaryExpression() |
|
public final void |
relationalExpression() |
|
public final void |
resource() |
|
public final void |
resourceList() |
|
public final void |
resources() |
|
public void |
setFilename(String f) |
|
public void |
setSourceBuffer(SourceBuffer sourceBuffer) |
|
public final void |
shiftExpression() |
|
public final void |
statement() |
|
public final void |
superClassClause() |
|
public final void |
throwsClause() |
|
public final void |
traditionalForClause() |
|
public final void |
tryBlock() |
|
public final void |
type() |
|
public final void |
typeArgument() |
|
public final void |
typeArgumentBounds() |
|
public final void |
typeArgumentSpec() |
|
public final void |
typeArguments() |
|
public final void |
typeArgumentsOrDiamond() |
|
protected final void |
typeArgumentsOrParametersEnd() |
|
public final void |
typeDefinition() |
|
protected final void |
typeDefinitionInternal(AST mods) |
|
public final void |
typeParameter() |
|
public final void |
typeParameterBounds() |
|
public final void |
typeParameters() |
|
public final void |
typeSpec(boolean addImagNode) |
|
public final void |
unaryExpression() |
|
public final void |
unaryExpressionNotPlusMinus() |
|
public final void |
varInitializer() |
|
public final void |
variableDeclarator(AST mods, AST t) Declaration of a variable. |
|
public final void |
variableDefinitions(AST mods, AST t) |
|
public final void |
variableLengthParameterDeclaration() |
|
public final void |
wildcardType() |
Create an AST node with the token type and text passed in, but with the same background information as another supplied Token (e.g. line numbers) to be used in place of antlr tree construction syntax, i.e. #[TOKEN,"text"] becomes create(TOKEN,"text",anotherToken) todo - change antlr.ASTFactory to do this instead...
Catch obvious constructor calls, but not the expr.super(...) calls
Match a, a.b.c refs, a.b.c(...) refs, a.b.c[], a.b.c[].class, and a.b.c.class refs. Also this(...) and super(...). Match this or super.
This factory is the correct way to wire together a Groovy parser and lexer.
object instantiation. Trees are built as illustrated by the following input/tree pairs: new T() new | T -- ELIST | arg1 -- arg2 -- .. -- argn new int[] new | int -- ARRAY_DECLARATOR new int[] {1,2} new | int -- ARRAY_DECLARATOR -- ARRAY_INIT | EXPR -- EXPR | | 1 2 new int[3] new | int -- ARRAY_DECLARATOR | EXPR | 3 new int[1][2] new | int -- ARRAY_DECLARATOR | ARRAY_DECLARATOR -- EXPR | | EXPR 1 | 2
Declaration of a variable. This can be a class/instance variable, or a local variable in a method It can also include possible initialization.
Copyright © 2003-2024 The Apache Software Foundation. All rights reserved.