koala.dynamicjava.parser.impl
Class Parser

java.lang.Object
  extended by koala.dynamicjava.parser.impl.Parser
All Implemented Interfaces:
ParserConstants

public class Parser
extends java.lang.Object
implements ParserConstants

This class represents a (interpreted) Java 1.1 language parser adapted for 1.5 language extensions.


Nested Class Summary
static class Parser.DeclType
           
 
Field Summary
 Token jj_nt
           
 boolean lookingAhead
           
 Token token
           
 ParserTokenManager token_source
           
 
Fields inherited from interface koala.dynamicjava.parser.impl.ParserConstants
_DEFAULT, ABSTRACT, AND_ASSIGN, ASSERT, ASSIGN, BANG, BITWISE_AND, BITWISE_OR, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONDITIONAL_AND, CONDITIONAL_OR, CONST, CONTINUE, DECIMAL_LITERAL, DECREMENT, DEFAULT, DIGIT, DO, DOT, DOUBLE, DOUBLE_LITERAL, ELSE, ENUM, EOF, EQUAL, EXPONENT, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOAT_LITERAL, FOR, FORMAL_COMMENT, GOTO, GREATER_OR_EQUAL, GREATER_THAN, HEX_LITERAL, HOOK, IDENTIFIER, IF, IMPLEMENTS, IMPORT, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INCREMENT, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LBRACE, LBRACKET, LEFT_SHIFT, LEFT_SHIFT_ASSIGN, LESS, LESS_OR_EQUAL, LETTER, LONG, LONG_LITERAL, LPAREN, MINUS, MINUS_ASSIGN, MULTI_LINE_COMMENT, NATIVE, NEW, NOT_EQUAL, NULL, OCTAL_LITERAL, OR_ASSIGN, PACKAGE, PLUS, PLUS_ASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, REMAINDER, REMAINDER_ASSIGN, RETURN, RIGHT_SIGNED_SHIFT_ASSIGN, RIGHT_UNSIGNED_SHIFTASSIGN, RPAREN, RSIGNEDSHIFT, RSSHIFT1, RSSHIFT2, RUNSIGNEDSHIFT, RUSHIFT1, RUSHIFT2, RUSHIFT3, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, SLASH, SLASH_ASSIGN, STAR, STAR_ASSIGN, STATIC, STRICTFP, STRING_LITERAL, SUPER, SWITCH, SYNCHRONIZED, THIS, THROW, THROWS, TILDE, tokenImage, TRANSIENT, TRUE, TRY, VAR_ARGS, VOID, VOLATILE, WHILE, XOR, XOR_ASSIGN
 
Constructor Summary
Parser(java.io.InputStream stream)
           
Parser(java.io.InputStream stream, java.lang.String encoding)
           
Parser(ParserTokenManager tm)
           
Parser(java.io.Reader stream)
           
 
Method Summary
 Expression additiveExpression()
          Used internally to parse an expression
 koala.dynamicjava.parser.impl.Parser.Primary allocation()
          Used internally to parse an expression
 Expression andExpression()
          Used internally to parse an expression
 Annotation annotation()
           
 ArrayInitializer annotationArrayValue()
           
 Expression annotationValue()
           
 java.util.List<Expression> arguments()
          Used internally to parse an expression
 ArrayAllocation.TypeDescriptor arrayDimsAndInits()
          Used internally to parse an expression
 ArrayInitializer arrayInitializer()
          Parses an array initializer
 AssertStatement assertStatement()
          Parses an assert statement
 BlockStatement block()
          Parses a block
 java.util.List<Node> blockStatement()
          Parses one block statement.
 BreakStatement breakStatement()
          Parses a break statement
 Expression castExpression()
          Used internally to parse an expression
 void castLookahead()
          Distinguish a cast expression from a parenthesized expression.
 java.util.List<Node> classBody()
          Used internally to parse the body of a class
 java.util.List<Node> classBodyDeclaration()
          Parses one declaration in the body of a class.
 ClassDeclaration classDeclaration(Parser.DeclType level)
          Parses a class declaration
 Expression conditionalAndExpression()
          Used internally to parse an expression
 Expression conditionalExpression()
          Used internally to parse an expression
 Expression conditionalOrExpression()
          Used internally to parse an expression
 ConstructorDeclaration constructorDeclaration()
           
 void constructorLookahead()
          Distinguish an unmodified constructor declaration from other declarations.
 ContinueStatement continueStatement()
          Parses a continue statement
 void disable_tracing()
           
 DoStatement doStatement()
          Parses a do statement
 EmptyStatement emptyStatement()
          Parses an empty statement
 void enable_tracing()
           
 EnumDeclaration.EnumBody enumBody()
          Parses the body of an enum
 EnumDeclaration.EnumConstant enumConstant()
           
 java.util.List<EnumDeclaration.EnumConstant> enumConstants()
           
 EnumDeclaration enumDeclaration(Parser.DeclType level)
          Parses an enum declaration
 Expression equalityExpression()
          Used internally to parse an expression
 Expression exclusiveOrExpression()
          Used internally to parse an expression
 Expression expression()
          Parses an expression
 ExpressionStatement expressionStatement(boolean strictExpression)
          Parses an ExpressionStatement; if strictExpression is true, a trailing semicolon is required and only StatementExpressions will be allowed.
 java.util.List<Node> expressionStatementList()
          Parses a comma separated list of strict ExpressionStatements
 Expression expressionSuffix(Expression pre)
          Used internally to parse an expression
 FormalParameter forEachParameter(ModifierSet mods)
          A for-each parameter, which is more restricted than a general formal parameter (no additional array brackets, and no varargs)
 FormalParameter formalParameter()
          Parses one formal parameter
 java.util.List<FormalParameter> formalParameters()
          Parses formal parameters of the form '(param, param, ...)'
 ForSlashEachStatement forStatement()
          Parses a for statement (with standard or foreach syntax)
 ParseException generateParseException()
           
 Token getNextToken()
           
 Token getToken(int index)
           
 Statement ifStatement()
          Parses an if statement
 ImportDeclaration importDeclaration()
           
 Expression inclusiveOrExpression()
          Used internally to parse an expression
 Initializer initializer()
          Parses one initializer
 Expression instanceOfExpression()
          Used internally to parse an expression
 InterfaceDeclaration interfaceDeclaration(Parser.DeclType level)
          Parses a interface declaration
 java.util.List<Node> interfaceMemberDeclaration()
          Parses one declaration in the body of an interface.
 Node keywordStatement(boolean strictExpressions)
          A statement that starts with a keyword or special delimiter.
 Statement labeledStatement()
          Parses a labeled statement
 Expression literal()
          Used internally to parse an expression
 MethodDeclaration methodDeclaration(Parser.DeclType level)
           
 void methodLookahead()
          Distinguish an unmodified method declaration from other declarations.
 ModifierSet modifiers()
          Parse a nonempty list of modifiers and annotations
 Expression multiplicativeExpression()
          Used internally to parse an expression
 java.util.List<IdentifierToken> name()
          Parses a name
 ModifierSet noModifiers()
          Create an empty modifier set at the current location.
 Node nonKeywordStatement(boolean strictExpressions)
          A statement that does not begin with a keyword (and thus may need special lookahead treatment).
 ModifierSet optionalModifiers()
           
 Token optionalSemicolon()
           
 Option<java.util.List<TypeName>> optionalTypeArguments()
           
 PackageDeclaration packageDeclaration(Parser.DeclType level)
           
 CompilationUnit parseCompilationUnit()
          Parses a Java compilation unit
 java.util.List<Node> parseStream()
          Parses input stream.
 Expression postfixExpression()
          Used internally to parse an expression
 Expression preDecrementExpression()
          Used internally to parse an expression
 Expression preIncrementExpression()
          Used internally to parse an expression
 Expression primaryExpression()
          Used internally to parse an expression
 koala.dynamicjava.parser.impl.Parser.Primary primaryPrefix()
          Used internally to parse an expression
 PrimitiveTypeName primitiveType()
          Used internally to parse types
 ReferenceTypeName referenceTypeName()
          Consumes as large a name as possible: the type must not be followed by ".[id]" or "<", because the parser will assume those delimiters mark a continuation of the ReferenceTypeName.
 java.util.List<? extends ReferenceTypeName> ReferenceTypeNameList()
          Parses a comma separated list of ReferenceTypeName names
 void ReInit(java.io.InputStream stream)
           
 void ReInit(java.io.InputStream stream, java.lang.String encoding)
           
 void ReInit(ParserTokenManager tm)
           
 void ReInit(java.io.Reader stream)
           
 Expression relationalExpression()
          Used internally to parse an expression
 java.util.List<Node> replStatement()
          Parses an item of the input stream.
 TypeName resultType()
          Used internally to parse types
 ReturnStatement returnStatement()
          Parses a return statement
 Token RightAngledBracket()
           
 void setFile(java.io.File f)
          Sets the current file
 void setOptions(Options o)
           
 Expression shiftExpression()
          Used internally to parse an expression
 Node statement(boolean strictExpressions)
           
 Expression statementExpression()
          Parse only an expression that can appear as a statement
 SwitchBlock switchBlock()
           
 SwitchStatement switchStatement()
          Parses a switch statement
 SynchronizedStatement synchronizedStatement()
          Parses a synchronized statement
 ThrowStatement throwStatement()
          Parses a throw statement
 TryStatement tryStatement()
          Parses a try statement
 TypeName type()
          Used internally to parse types
 TypeName TypeArgument()
           
 java.util.List<TypeName> typeArguments()
           
 TypeDeclaration typeDeclaration(Parser.DeclType level)
           
 TypeParameter typeParameter()
           
 java.util.List<TypeParameter> typeParameters()
           
 Expression unaryExpression()
          Used internally to parse an expression
 Expression unaryExpressionNotPlusMinus()
          Used internally to parse an expression
 ClassDeclaration unmodifiedClassDeclaration(ModifierSet mods, Parser.DeclType level)
          Parses a class declaration without modifier
 ConstructorDeclaration unmodifiedConstructorDeclaration(ModifierSet mods)
           
 EnumDeclaration unmodifiedEnumDeclaration(ModifierSet mods, Parser.DeclType level)
           
 InterfaceDeclaration unmodifiedInterfaceDeclaration(ModifierSet mods, Parser.DeclType level)
          Parses a interface declaration without modifier
 MethodDeclaration unmodifiedMethodDeclaration(ModifierSet mods, Parser.DeclType level)
           
 PackageDeclaration unmodifiedPackageDeclaration(ModifierSet mods, Parser.DeclType level)
           
 TypeDeclaration unmodifiedTypeDeclaration(ModifierSet mods, Parser.DeclType level)
           
 java.util.List<Node> unmodifiedVariableDeclaration(ModifierSet mods, Parser.DeclType level)
           
 java.util.List<Node> variableDeclaration(Parser.DeclType level)
          Parses a variable (field or local) declaration.
 Expression variableInitializer()
          Parses a variable initializer (ie.
 void variableLookahead()
          Distinguish an unmodified variable or field declaration from other declarations.
 WhileStatement whileStatement()
          Parses a while statement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public ParserTokenManager token_source

token

public Token token

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead
Constructor Detail

Parser

public Parser(java.io.InputStream stream)

Parser

public Parser(java.io.InputStream stream,
              java.lang.String encoding)

Parser

public Parser(java.io.Reader stream)

Parser

public Parser(ParserTokenManager tm)
Method Detail

setFile

public void setFile(java.io.File f)
Sets the current file


setOptions

public void setOptions(Options o)

parseStream

public final java.util.List<Node> parseStream()
                                       throws ParseException
Parses input stream. This production is not a Java language rule. It is used by DynamicJava.

Returns:
a list of nodes (possibly empty)
Throws:
ParseException
See Also:
Node

replStatement

public final java.util.List<Node> replStatement()
                                         throws ParseException
Parses an item of the input stream. This production is not a Java language rule. It is used by DynamicJava.

Returns:
a list of nodes (a list because a single variable declaration can be parsed to multiple VariableDeclaration nodes)
Throws:
ParseException
See Also:
Node

parseCompilationUnit

public final CompilationUnit parseCompilationUnit()
                                           throws ParseException
Parses a Java compilation unit

Returns:
a list of nodes (possibly empty)
Throws:
ParseException
See Also:
Node

optionalModifiers

public final ModifierSet optionalModifiers()
                                    throws ParseException
Throws:
ParseException

noModifiers

public final ModifierSet noModifiers()
                              throws ParseException
Create an empty modifier set at the current location.

Throws:
ParseException

modifiers

public final ModifierSet modifiers()
                            throws ParseException
Parse a nonempty list of modifiers and annotations

Throws:
ParseException

packageDeclaration

public final PackageDeclaration packageDeclaration(Parser.DeclType level)
                                            throws ParseException
Throws:
ParseException

unmodifiedPackageDeclaration

public final PackageDeclaration unmodifiedPackageDeclaration(ModifierSet mods,
                                                             Parser.DeclType level)
                                                      throws ParseException
Throws:
ParseException

importDeclaration

public final ImportDeclaration importDeclaration()
                                          throws ParseException
Throws:
ParseException

typeDeclaration

public final TypeDeclaration typeDeclaration(Parser.DeclType level)
                                      throws ParseException
Throws:
ParseException

unmodifiedTypeDeclaration

public final TypeDeclaration unmodifiedTypeDeclaration(ModifierSet mods,
                                                       Parser.DeclType level)
                                                throws ParseException
Throws:
ParseException

name

public final java.util.List<IdentifierToken> name()
                                           throws ParseException
Parses a name

Returns:
a list of tree token
Throws:
ParseException
See Also:
TreeToken

referenceTypeName

public final ReferenceTypeName referenceTypeName()
                                          throws ParseException
Consumes as large a name as possible: the type must not be followed by ".[id]" or "<", because the parser will assume those delimiters mark a continuation of the ReferenceTypeName.

Throws:
ParseException

ReferenceTypeNameList

public final java.util.List<? extends ReferenceTypeName> ReferenceTypeNameList()
                                                                        throws ParseException
Parses a comma separated list of ReferenceTypeName names

Returns:
a list of ReferenceTypeName
Throws:
ParseException
See Also:
ReferenceTypeName

classDeclaration

public final ClassDeclaration classDeclaration(Parser.DeclType level)
                                        throws ParseException
Parses a class declaration

Throws:
ParseException
See Also:
ClassDeclaration

unmodifiedClassDeclaration

public final ClassDeclaration unmodifiedClassDeclaration(ModifierSet mods,
                                                         Parser.DeclType level)
                                                  throws ParseException
Parses a class declaration without modifier

Throws:
ParseException
See Also:
ClassDeclaration

classBody

public final java.util.List<Node> classBody()
                                     throws ParseException
Used internally to parse the body of a class

Throws:
ParseException

classBodyDeclaration

public final java.util.List<Node> classBodyDeclaration()
                                                throws ParseException
Parses one declaration in the body of a class.

Returns:
a list of node because one field declaration can contain multiple declarations.
Throws:
ParseException
See Also:
Node

variableDeclaration

public final java.util.List<Node> variableDeclaration(Parser.DeclType level)
                                               throws ParseException
Parses a variable (field or local) declaration.

Returns:
a list of field declaration because one variable declaration can contain multiple declarations.
Throws:
ParseException

unmodifiedVariableDeclaration

public final java.util.List<Node> unmodifiedVariableDeclaration(ModifierSet mods,
                                                                Parser.DeclType level)
                                                         throws ParseException
Throws:
ParseException

methodDeclaration

public final MethodDeclaration methodDeclaration(Parser.DeclType level)
                                          throws ParseException
Throws:
ParseException

unmodifiedMethodDeclaration

public final MethodDeclaration unmodifiedMethodDeclaration(ModifierSet mods,
                                                           Parser.DeclType level)
                                                    throws ParseException
Throws:
ParseException

formalParameters

public final java.util.List<FormalParameter> formalParameters()
                                                       throws ParseException
Parses formal parameters of the form '(param, param, ...)'

Throws:
ParseException
See Also:
FormalParameter

formalParameter

public final FormalParameter formalParameter()
                                      throws ParseException
Parses one formal parameter

Throws:
ParseException
See Also:
FormalParameter

initializer

public final Initializer initializer()
                              throws ParseException
Parses one initializer

Throws:
ParseException
See Also:
Initializer

constructorDeclaration

public final ConstructorDeclaration constructorDeclaration()
                                                    throws ParseException
Throws:
ParseException

unmodifiedConstructorDeclaration

public final ConstructorDeclaration unmodifiedConstructorDeclaration(ModifierSet mods)
                                                              throws ParseException
Throws:
ParseException

interfaceDeclaration

public final InterfaceDeclaration interfaceDeclaration(Parser.DeclType level)
                                                throws ParseException
Parses a interface declaration

Throws:
ParseException
See Also:
InterfaceDeclaration

unmodifiedInterfaceDeclaration

public final InterfaceDeclaration unmodifiedInterfaceDeclaration(ModifierSet mods,
                                                                 Parser.DeclType level)
                                                          throws ParseException
Parses a interface declaration without modifier

Throws:
ParseException
See Also:
InterfaceDeclaration

interfaceMemberDeclaration

public final java.util.List<Node> interfaceMemberDeclaration()
                                                      throws ParseException
Parses one declaration in the body of an interface.

Returns:
a list of node because one field declaration can contain multiple declarations.
Throws:
ParseException
See Also:
Node

enumDeclaration

public final EnumDeclaration enumDeclaration(Parser.DeclType level)
                                      throws ParseException
Parses an enum declaration

Throws:
ParseException
See Also:
EnumDeclaration

unmodifiedEnumDeclaration

public final EnumDeclaration unmodifiedEnumDeclaration(ModifierSet mods,
                                                       Parser.DeclType level)
                                                throws ParseException
Throws:
ParseException

enumBody

public final EnumDeclaration.EnumBody enumBody()
                                        throws ParseException
Parses the body of an enum

Throws:
ParseException
See Also:
Node

enumConstants

public final java.util.List<EnumDeclaration.EnumConstant> enumConstants()
                                                                 throws ParseException
Throws:
ParseException

enumConstant

public final EnumDeclaration.EnumConstant enumConstant()
                                                throws ParseException
Throws:
ParseException

arrayInitializer

public final ArrayInitializer arrayInitializer()
                                        throws ParseException
Parses an array initializer

Throws:
ParseException
See Also:
ArrayInitializer

variableInitializer

public final Expression variableInitializer()
                                     throws ParseException
Parses a variable initializer (ie. an expression or an array initializer)

Throws:
ParseException
See Also:
Expression

block

public final BlockStatement block()
                           throws ParseException
Parses a block

Throws:
ParseException
See Also:
BlockStatement

blockStatement

public final java.util.List<Node> blockStatement()
                                          throws ParseException
Parses one block statement.

Returns:
a list of node because one variable declaration can contain multiple declarations.
Throws:
ParseException
See Also:
Node

statement

public final Node statement(boolean strictExpressions)
                     throws ParseException
Throws:
ParseException

keywordStatement

public final Node keywordStatement(boolean strictExpressions)
                            throws ParseException
A statement that starts with a keyword or special delimiter.

Throws:
ParseException

nonKeywordStatement

public final Node nonKeywordStatement(boolean strictExpressions)
                               throws ParseException
A statement that does not begin with a keyword (and thus may need special lookahead treatment).

Throws:
ParseException

labeledStatement

public final Statement labeledStatement()
                                 throws ParseException
Parses a labeled statement

Throws:
ParseException
See Also:
ContinueTarget, LabeledStatement

emptyStatement

public final EmptyStatement emptyStatement()
                                    throws ParseException
Parses an empty statement

Throws:
ParseException
See Also:
EmptyStatement

ifStatement

public final Statement ifStatement()
                            throws ParseException
Parses an if statement

Throws:
ParseException
See Also:
IfThenStatement, IfThenElseStatement

assertStatement

public final AssertStatement assertStatement()
                                      throws ParseException
Parses an assert statement

Throws:
ParseException
See Also:
AssertStatement

whileStatement

public final WhileStatement whileStatement()
                                    throws ParseException
Parses a while statement

Throws:
ParseException
See Also:
WhileStatement

doStatement

public final DoStatement doStatement()
                              throws ParseException
Parses a do statement

Throws:
ParseException
See Also:
DoStatement

switchStatement

public final SwitchStatement switchStatement()
                                      throws ParseException
Parses a switch statement

Throws:
ParseException
See Also:
SwitchStatement

switchBlock

public final SwitchBlock switchBlock()
                              throws ParseException
Throws:
ParseException

forStatement

public final ForSlashEachStatement forStatement()
                                         throws ParseException
Parses a for statement (with standard or foreach syntax)

Throws:
ParseException
See Also:
Modified by Adam Wulf and David Peters March 2004: Dr. Java team., ForSlashEachStatement, ForEachStatement

forEachParameter

public final FormalParameter forEachParameter(ModifierSet mods)
                                       throws ParseException
A for-each parameter, which is more restricted than a general formal parameter (no additional array brackets, and no varargs)

Throws:
ParseException

expressionStatementList

public final java.util.List<Node> expressionStatementList()
                                                   throws ParseException
Parses a comma separated list of strict ExpressionStatements

Throws:
ParseException

breakStatement

public final BreakStatement breakStatement()
                                    throws ParseException
Parses a break statement

Throws:
ParseException
See Also:
BreakStatement

continueStatement

public final ContinueStatement continueStatement()
                                          throws ParseException
Parses a continue statement

Throws:
ParseException
See Also:
ContinueStatement

returnStatement

public final ReturnStatement returnStatement()
                                      throws ParseException
Parses a return statement

Throws:
ParseException
See Also:
ReturnStatement

throwStatement

public final ThrowStatement throwStatement()
                                    throws ParseException
Parses a throw statement

Throws:
ParseException
See Also:
ThrowStatement

synchronizedStatement

public final SynchronizedStatement synchronizedStatement()
                                                  throws ParseException
Parses a synchronized statement

Throws:
ParseException
See Also:
SynchronizedStatement

tryStatement

public final TryStatement tryStatement()
                                throws ParseException
Parses a try statement

Throws:
ParseException
See Also:
TryStatement

expressionStatement

public final ExpressionStatement expressionStatement(boolean strictExpression)
                                              throws ParseException
Parses an ExpressionStatement; if strictExpression is true, a trailing semicolon is required and only StatementExpressions will be allowed.

Throws:
ParseException

optionalSemicolon

public final Token optionalSemicolon()
                              throws ParseException
Throws:
ParseException

expression

public final Expression expression()
                            throws ParseException
Parses an expression

Throws:
ParseException
See Also:
Expression

statementExpression

public final Expression statementExpression()
                                     throws ParseException
Parse only an expression that can appear as a statement

Throws:
ParseException

expressionSuffix

public final Expression expressionSuffix(Expression pre)
                                  throws ParseException
Used internally to parse an expression

Throws:
ParseException

conditionalExpression

public final Expression conditionalExpression()
                                       throws ParseException
Used internally to parse an expression

Throws:
ParseException

conditionalOrExpression

public final Expression conditionalOrExpression()
                                         throws ParseException
Used internally to parse an expression

Throws:
ParseException

conditionalAndExpression

public final Expression conditionalAndExpression()
                                          throws ParseException
Used internally to parse an expression

Throws:
ParseException

inclusiveOrExpression

public final Expression inclusiveOrExpression()
                                       throws ParseException
Used internally to parse an expression

Throws:
ParseException

exclusiveOrExpression

public final Expression exclusiveOrExpression()
                                       throws ParseException
Used internally to parse an expression

Throws:
ParseException

andExpression

public final Expression andExpression()
                               throws ParseException
Used internally to parse an expression

Throws:
ParseException

equalityExpression

public final Expression equalityExpression()
                                    throws ParseException
Used internally to parse an expression

Throws:
ParseException

instanceOfExpression

public final Expression instanceOfExpression()
                                      throws ParseException
Used internally to parse an expression

Throws:
ParseException

relationalExpression

public final Expression relationalExpression()
                                      throws ParseException
Used internally to parse an expression

Throws:
ParseException

shiftExpression

public final Expression shiftExpression()
                                 throws ParseException
Used internally to parse an expression

Throws:
ParseException

additiveExpression

public final Expression additiveExpression()
                                    throws ParseException
Used internally to parse an expression

Throws:
ParseException

multiplicativeExpression

public final Expression multiplicativeExpression()
                                          throws ParseException
Used internally to parse an expression

Throws:
ParseException

unaryExpression

public final Expression unaryExpression()
                                 throws ParseException
Used internally to parse an expression

Throws:
ParseException

unaryExpressionNotPlusMinus

public final Expression unaryExpressionNotPlusMinus()
                                             throws ParseException
Used internally to parse an expression

Throws:
ParseException

castExpression

public final Expression castExpression()
                                throws ParseException
Used internally to parse an expression

Throws:
ParseException

preIncrementExpression

public final Expression preIncrementExpression()
                                        throws ParseException
Used internally to parse an expression

Throws:
ParseException

preDecrementExpression

public final Expression preDecrementExpression()
                                        throws ParseException
Used internally to parse an expression

Throws:
ParseException

postfixExpression

public final Expression postfixExpression()
                                   throws ParseException
Used internally to parse an expression

Throws:
ParseException

primaryExpression

public final Expression primaryExpression()
                                   throws ParseException
Used internally to parse an expression

Throws:
ParseException

primaryPrefix

public final koala.dynamicjava.parser.impl.Parser.Primary primaryPrefix()
                                                                 throws ParseException
Used internally to parse an expression

Throws:
ParseException

allocation

public final koala.dynamicjava.parser.impl.Parser.Primary allocation()
                                                              throws ParseException
Used internally to parse an expression

Throws:
ParseException

arrayDimsAndInits

public final ArrayAllocation.TypeDescriptor arrayDimsAndInits()
                                                       throws ParseException
Used internally to parse an expression

Throws:
ParseException

arguments

public final java.util.List<Expression> arguments()
                                           throws ParseException
Used internally to parse an expression

Throws:
ParseException

literal

public final Expression literal()
                         throws ParseException
Used internally to parse an expression

Throws:
ParseException

type

public final TypeName type()
                    throws ParseException
Used internally to parse types

Throws:
ParseException

resultType

public final TypeName resultType()
                          throws ParseException
Used internally to parse types

Throws:
ParseException

primitiveType

public final PrimitiveTypeName primitiveType()
                                      throws ParseException
Used internally to parse types

Throws:
ParseException

typeParameters

public final java.util.List<TypeParameter> typeParameters()
                                                   throws ParseException
Throws:
ParseException

typeParameter

public final TypeParameter typeParameter()
                                  throws ParseException
Throws:
ParseException

optionalTypeArguments

public final Option<java.util.List<TypeName>> optionalTypeArguments()
                                                             throws ParseException
Throws:
ParseException

typeArguments

public final java.util.List<TypeName> typeArguments()
                                             throws ParseException
Throws:
ParseException

TypeArgument

public final TypeName TypeArgument()
                            throws ParseException
Throws:
ParseException

RightAngledBracket

public final Token RightAngledBracket()
                               throws ParseException
Throws:
ParseException

annotation

public final Annotation annotation()
                            throws ParseException
Throws:
ParseException

annotationValue

public final Expression annotationValue()
                                 throws ParseException
Throws:
ParseException

annotationArrayValue

public final ArrayInitializer annotationArrayValue()
                                            throws ParseException
Throws:
ParseException

castLookahead

public final void castLookahead()
                         throws ParseException
Distinguish a cast expression from a parenthesized expression.

Throws:
ParseException

constructorLookahead

public final void constructorLookahead()
                                throws ParseException
Distinguish an unmodified constructor declaration from other declarations.

Throws:
ParseException

methodLookahead

public final void methodLookahead()
                           throws ParseException
Distinguish an unmodified method declaration from other declarations.

Throws:
ParseException

variableLookahead

public final void variableLookahead()
                             throws ParseException
Distinguish an unmodified variable or field declaration from other declarations.

Throws:
ParseException

ReInit

public void ReInit(java.io.InputStream stream)

ReInit

public void ReInit(java.io.InputStream stream,
                   java.lang.String encoding)

ReInit

public void ReInit(java.io.Reader stream)

ReInit

public void ReInit(ParserTokenManager tm)

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

generateParseException

public ParseException generateParseException()

enable_tracing

public final void enable_tracing()

disable_tracing

public final void disable_tracing()