|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--koala.dynamicjava.parser.Parser
This class represents a (interpreted) Java 1.1 language parser
Field Summary | |
Token |
jj_nt
|
boolean |
lookingAhead
|
Token |
token
|
ParserTokenManager |
token_source
|
Constructor Summary | |
Parser(java.io.InputStream stream)
|
|
Parser(ParserTokenManager tm)
|
|
Parser(java.io.Reader stream)
|
Method Summary | |
Expression |
additiveExpression()
Used internally to parse an expression |
void |
additiveExpressionLookahead()
Used internally for lookahead |
Expression |
allocationExpression()
Used internally to parse an expression |
void |
allocationExpressionLookahead()
Used internally for lookahead |
Expression |
andExpression()
Used internally to parse an expression |
void |
andExpressionLookahead()
Used internally for lookahead |
java.util.List |
argumentList()
Used internally to parse an expression |
koala.dynamicjava.parser.Parser.ArgumentsSuffix |
arguments()
Used internally to parse an expression |
void |
argumentsLookahead()
Used internally for lookahead |
ArrayAllocation.TypeDescriptor |
arrayDimsAndInits()
Used internally to parse an expression |
void |
arrayDimsAndInitsLookahead()
Used internally for lookahead |
ArrayInitializer |
arrayInitializer()
Parses an array initializer |
void |
arrayInitializerLookahead()
Used internally for lookahead |
koala.dynamicjava.parser.Parser.ExpressionSuffix |
arrayReference()
Used internally to parse an expression |
void |
assignmentOperatorLookahead()
Used internally for lookahead |
BlockStatement |
block()
Parses a block |
void |
blockLookahead()
Used internally for lookahead |
java.util.List |
blockStatement()
Parses one block statement. |
void |
blockStatementLookahead()
Used internally for lookahead |
BreakStatement |
breakStatement()
Parses a break statement |
void |
breakStatementLookahead()
Used internally for lookahead |
Expression |
castExpression()
Used internally to parse an expression |
void |
castExpressionLookahead()
Used internally for lookahead |
void |
castLookahead()
Used internally for lookahead |
koala.dynamicjava.parser.Parser.ClassBody |
classBody()
Used internally to parse the body of a class |
java.util.List |
classBodyDeclaration()
Parses one declaration in the body of a class. |
void |
classBodyDeclarationLookahead()
Used internally for lookahead |
void |
classBodyLookahead()
Used internally for lookahead |
ClassDeclaration |
classDeclaration()
Parses a class declaration |
void |
classDeclarationLookahead()
Used internally for lookahead |
void |
classDeclarationLookahead2()
Used internally for lookahead |
Expression |
classExpression()
Used internally to parse an expression |
Expression |
conditionalAndExpression()
Used internally to parse an expression |
void |
conditionalAndExpressionLookahead()
Used internally for lookahead |
Expression |
conditionalExpression()
Used internally to parse an expression |
void |
conditionalExpressionLookahead()
Used internally for lookahead |
Expression |
conditionalOrExpression()
Used internally to parse an expression |
void |
conditionalOrExpressionLookahead()
Used internally for lookahead |
ConstructorDeclaration |
constructorDeclaration()
Parses a constructor declaration |
void |
constructorDeclarationLookahead()
Used internally for lookahead |
void |
constructorDeclarationLookahead2()
Used internally for lookahead |
ContinueStatement |
continueStatement()
Parses a continue statement |
void |
continueStatementLookahead()
Used internally for lookahead |
void |
disable_tracing()
|
DoStatement |
doStatement()
Parses a do statement |
void |
doStatementLookahead()
Used internally for lookahead |
koala.dynamicjava.parser.Parser.ExpressionSuffix |
dotAllocationExpression()
Used internally to parse an expression |
koala.dynamicjava.parser.Parser.ExpressionSuffix |
dotIdentifier()
Used internally to parse an expression |
koala.dynamicjava.parser.Parser.ExpressionSuffix |
dotThis()
Used internally to parse an expression |
EmptyStatement |
emptyStatement()
Parses an empty statement |
void |
enable_tracing()
|
Expression |
equalityExpression()
Used internally to parse an expression |
void |
equalityExpressionLookahead()
Used internally for lookahead |
Expression |
exclusiveOrExpression()
Used internally to parse an expression |
void |
exclusiveOrExpressionLookahead()
Used internally for lookahead |
ConstructorInvocation |
explicitConstructorInvocation()
Parses a constructor invocation |
void |
explicitConstructorInvocationLookahead()
Used internally for lookahead |
Expression |
expression()
Parses an expression |
void |
expressionLookahead()
Used internally for lookahead |
Expression |
expressionSuffix(Expression pre)
Used internally to parse an expression |
java.util.List |
fieldDeclaration()
Parses a field declaration. |
void |
fieldDeclarationLookahead()
Used internally for lookahead |
java.util.List |
forInit()
Used internally to parse a 'for' statement |
void |
forInitLookahead()
Used internally for lookahead |
FormalParameter |
formalParameter()
Parses one formal parameter |
void |
formalParameterLookahead()
Used internally for lookahead |
java.util.List |
formalParameters()
Parses formal parameters of the form '(param, param, ...)' |
void |
formalParametersLookahead()
Used internally for lookahead |
ForStatement |
forStatement()
Parses a for statement |
void |
forStatementLookahead()
Used internally for lookahead |
ParseException |
generateParseException()
|
Token |
getNextToken()
|
Token |
getToken(int index)
|
Statement |
ifStatement()
Parses an if statement |
void |
ifStatementLookahead()
Used internally for lookahead |
ImportDeclaration |
importDeclaration()
Parses an import declaration |
Expression |
inclusiveOrExpression()
Used internally to parse an expression |
void |
inclusiveOrExpressionLookahead()
Used internally for lookahead |
Initializer |
initializer()
Parses one initializer |
void |
initializerLookahead()
Used internally for lookahead |
Expression |
instanceOfExpression()
Used internally to parse an expression |
void |
instanceOfExpressionLookahead()
Used internally for lookahead |
InterfaceDeclaration |
interfaceDeclaration()
Parses a interface declaration |
void |
interfaceDeclarationLookahead()
Used internally for lookahead |
void |
interfaceDeclarationLookahead2()
Used internally for lookahead |
java.util.List |
interfaceMemberDeclaration()
Parses one declaration in the body of an interface. |
void |
interfaceMemberDeclarationLookahead()
Used internally for lookahead |
Statement |
labeledStatement()
Parses a labeled statement |
void |
labeledStatementLookahead()
Used internally for lookahead |
Expression |
literal()
Used internally to parse an expression |
void |
literalLookahead()
Used internally for lookahead |
java.util.List |
localVariableDeclaration()
Parses one variable declaration |
void |
localVariableDeclarationLookahead()
Used internally for lookahead |
MethodDeclaration |
methodDeclaration()
Parses a method declaration |
void |
methodDeclarationLookahead()
Used internally for lookahead |
void |
methodDeclarationLookahead2()
Used internally for lookahead |
void |
methodDeclaratorLookahead()
Used internally for lookahead |
koala.dynamicjava.parser.Parser.ModifierFlags |
modifiers()
Used internally to parse a modifier |
void |
modifiersLookahead()
Used internally for lookahead |
Expression |
multiplicativeExpression()
Used internally to parse an expression |
void |
multiplicativeExpressionLookahead()
Used internally for lookahead |
java.util.List |
name()
Parses a name |
java.util.List |
nameList()
Parses a comma separated list of names |
void |
nameListLookahead()
Used internally for lookahead |
void |
nameLookahead()
Used internally for lookahead |
PackageDeclaration |
packageDeclaration()
Parses a package declaration |
java.util.List |
parseCompilationUnit()
Parses a Java compilation unit |
java.util.List |
parseStream()
Parses top level statements. |
Expression |
postfixExpression()
Used internally to parse an expression |
void |
postfixExpressionLookahead()
Used internally for lookahead |
Expression |
preDecrementExpression()
Used internally to parse an expression |
void |
preDecrementExpressionLookahead()
Used internally for lookahead |
Expression |
preIncrementExpression()
Used internally to parse an expression |
void |
preIncrementExpressionLookahead()
Used internally for lookahead |
Expression |
primaryExpression()
Used internally to parse an expression |
void |
primaryExpressionLookahead()
Used internally for lookahead |
Expression |
primaryPrefix()
Used internally to parse an expression |
void |
primaryPrefixLookahead()
Used internally for lookahead |
koala.dynamicjava.parser.Parser.ExpressionSuffix |
primarySuffix()
Used internally to parse an expression |
void |
primarySuffixLookahead()
Used internally for lookahead |
Type |
primitiveType()
Used internally to parse types |
void |
primitiveTypeLookahead()
Used internally for lookahead |
Expression |
qualifiedName()
Used internally to parse an expression |
void |
ReInit(java.io.InputStream stream)
|
void |
ReInit(ParserTokenManager tm)
|
void |
ReInit(java.io.Reader stream)
|
Expression |
relationalExpression()
Used internally to parse an expression |
void |
relationalExpressionLookahead()
Used internally for lookahead |
Type |
resultType()
Used internally to parse types |
void |
resultTypeLookahead()
Used internally for lookahead |
ReturnStatement |
returnStatement()
Parses a return statement |
void |
returnStatementLookahead()
Used internally for lookahead |
void |
setFilename(java.lang.String fname)
Sets the current filename |
Expression |
shiftExpression()
Used internally to parse an expression |
void |
shiftExpressionLookahead()
Used internally for lookahead |
Allocation |
simpleAllocationExpression()
Used internally to parse an expression |
Node |
statement()
Parses one statement |
Node |
statementExpression()
Parses one statement expression |
java.util.List |
statementExpressionList()
Parses a comma separated list of expression |
void |
statementExpressionListLookahead()
Used internally for lookahead |
void |
statementExpressionLookahead()
Used internally for lookahead |
void |
statementLookahead()
Used internally for lookahead |
Expression |
superExpression()
Used internally to parse an expression |
SwitchStatement |
switchStatement()
Parses a switch statement |
void |
switchStatementLookahead()
Used internally for lookahead |
SynchronizedStatement |
synchronizedStatement()
Parses a synchronized statement |
void |
synchronizedStatementLookahead()
Used internally for lookahead |
Expression |
thisExpression()
Used internally to parse an expression |
ThrowStatement |
throwStatement()
Parses a throw statement |
void |
throwStatementLookahead()
Used internally for lookahead |
Node |
topLevelStatement()
Parses one top level statement. |
TryStatement |
tryStatement()
Parses a try statement |
void |
tryStatementLookahead()
Used internally for lookahead |
Type |
type()
Used internally to parse types |
TypeDeclaration |
typeDeclaration()
Parses a type declaration |
void |
typeLookahead()
Used internally for lookahead |
Expression |
unaryExpression()
Used internally to parse an expression |
void |
unaryExpressionLookahead()
Used internally for lookahead |
Expression |
unaryExpressionNotPlusMinus()
Used internally to parse an expression |
void |
unaryExpressionNotPlusMinusLookahead()
Used internally for lookahead |
ClassDeclaration |
unmodifiedClassDeclaration(koala.dynamicjava.parser.Parser.ModifierFlags mf)
Parses a class declaration without modifier |
void |
unmodifiedClassDeclarationLookahead()
Used internally for lookahead |
InterfaceDeclaration |
unmodifiedInterfaceDeclaration(koala.dynamicjava.parser.Parser.ModifierFlags mf)
Parses a interface declaration without modifier |
void |
unmodifiedInterfaceDeclarationLookahead()
Used internally for lookahead |
void |
variableDeclaratorIdLookahead()
Used internally for lookahead |
void |
variableDeclaratorLookahead()
Used internally for lookahead |
Expression |
variableInitializer()
Parses a variable initializer (ie. |
void |
variableInitializerLookahead()
Used internally for lookahead |
WhileStatement |
whileStatement()
Parses a while statement |
void |
whileStatementLookahead()
Used internally for lookahead |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public ParserTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
Constructor Detail |
public Parser(java.io.InputStream stream)
public Parser(java.io.Reader stream)
public Parser(ParserTokenManager tm)
Method Detail |
public void setFilename(java.lang.String fname)
fname
- the name of the input filepublic final java.util.List parseStream() throws ParseException
Node
public final Node topLevelStatement() throws ParseException
Node
public final java.util.List parseCompilationUnit() throws ParseException
Node
public final PackageDeclaration packageDeclaration() throws ParseException
PackageDeclaration
public final ImportDeclaration importDeclaration() throws ParseException
ImportDeclaration
public final TypeDeclaration typeDeclaration() throws ParseException
TypeDeclaration
public final java.util.List name() throws ParseException
TreeToken
public final java.util.List nameList() throws ParseException
TreeToken
public final ClassDeclaration classDeclaration() throws ParseException
ClassDeclaration
public final koala.dynamicjava.parser.Parser.ModifierFlags modifiers() throws ParseException
public final ClassDeclaration unmodifiedClassDeclaration(koala.dynamicjava.parser.Parser.ModifierFlags mf) throws ParseException
ClassDeclaration
public final koala.dynamicjava.parser.Parser.ClassBody classBody() throws ParseException
public final java.util.List classBodyDeclaration() throws ParseException
Node
public final java.util.List fieldDeclaration() throws ParseException
FieldDeclaration
public final MethodDeclaration methodDeclaration() throws ParseException
MethodDeclaration
public final java.util.List formalParameters() throws ParseException
FormalParameter
public final FormalParameter formalParameter() throws ParseException
FormalParameter
public final Initializer initializer() throws ParseException
Initializer
public final ConstructorDeclaration constructorDeclaration() throws ParseException
ConstructorDeclaration
public final ConstructorInvocation explicitConstructorInvocation() throws ParseException
ConstructorInvocation
public final InterfaceDeclaration interfaceDeclaration() throws ParseException
InterfaceDeclaration
public final InterfaceDeclaration unmodifiedInterfaceDeclaration(koala.dynamicjava.parser.Parser.ModifierFlags mf) throws ParseException
InterfaceDeclaration
public final java.util.List interfaceMemberDeclaration() throws ParseException
Node
public final ArrayInitializer arrayInitializer() throws ParseException
ArrayInitializer
public final Expression variableInitializer() throws ParseException
Expression
public final BlockStatement block() throws ParseException
BlockStatement
public final java.util.List blockStatement() throws ParseException
Node
public final java.util.List localVariableDeclaration() throws ParseException
VariableDeclaration
public final Node statement() throws ParseException
Node
public final Statement labeledStatement() throws ParseException
ContinueTarget
,
LabeledStatement
public final EmptyStatement emptyStatement() throws ParseException
EmptyStatement
public final Statement ifStatement() throws ParseException
IfThenStatement
,
IfThenElseStatement
public final WhileStatement whileStatement() throws ParseException
WhileStatement
public final DoStatement doStatement() throws ParseException
DoStatement
public final SwitchStatement switchStatement() throws ParseException
SwitchStatement
public final ForStatement forStatement() throws ParseException
ForStatement
public final java.util.List forInit() throws ParseException
public final java.util.List statementExpressionList() throws ParseException
public final BreakStatement breakStatement() throws ParseException
BreakStatement
public final ContinueStatement continueStatement() throws ParseException
ContinueStatement
public final ReturnStatement returnStatement() throws ParseException
ReturnStatement
public final ThrowStatement throwStatement() throws ParseException
ThrowStatement
public final SynchronizedStatement synchronizedStatement() throws ParseException
SynchronizedStatement
public final TryStatement tryStatement() throws ParseException
TryStatement
public final Node statementExpression() throws ParseException
Expression
public final Expression expression() throws ParseException
Expression
public final Expression expressionSuffix(Expression pre) throws ParseException
public final Expression conditionalExpression() throws ParseException
public final Expression conditionalOrExpression() throws ParseException
public final Expression conditionalAndExpression() throws ParseException
public final Expression inclusiveOrExpression() throws ParseException
public final Expression exclusiveOrExpression() throws ParseException
public final Expression andExpression() throws ParseException
public final Expression equalityExpression() throws ParseException
public final Expression instanceOfExpression() throws ParseException
public final Expression relationalExpression() throws ParseException
public final Expression shiftExpression() throws ParseException
public final Expression additiveExpression() throws ParseException
public final Expression multiplicativeExpression() throws ParseException
public final Expression unaryExpression() throws ParseException
public final Expression unaryExpressionNotPlusMinus() throws ParseException
public final Expression castExpression() throws ParseException
public final Expression preIncrementExpression() throws ParseException
public final Expression preDecrementExpression() throws ParseException
public final Expression postfixExpression() throws ParseException
public final Expression primaryExpression() throws ParseException
public final Expression primaryPrefix() throws ParseException
public final koala.dynamicjava.parser.Parser.ExpressionSuffix primarySuffix() throws ParseException
public final koala.dynamicjava.parser.Parser.ExpressionSuffix dotThis() throws ParseException
public final koala.dynamicjava.parser.Parser.ExpressionSuffix dotAllocationExpression() throws ParseException
public final Allocation simpleAllocationExpression() throws ParseException
public final koala.dynamicjava.parser.Parser.ExpressionSuffix dotIdentifier() throws ParseException
public final koala.dynamicjava.parser.Parser.ExpressionSuffix arrayReference() throws ParseException
public final koala.dynamicjava.parser.Parser.ArgumentsSuffix arguments() throws ParseException
public final java.util.List argumentList() throws ParseException
public final Expression literal() throws ParseException
public final Expression thisExpression() throws ParseException
public final Expression superExpression() throws ParseException
public final Expression qualifiedName() throws ParseException
public final Expression classExpression() throws ParseException
public final Expression allocationExpression() throws ParseException
public final ArrayAllocation.TypeDescriptor arrayDimsAndInits() throws ParseException
public final Type type() throws ParseException
public final Type resultType() throws ParseException
public final Type primitiveType() throws ParseException
public final void castLookahead() throws ParseException
public final void typeLookahead() throws ParseException
public final void resultTypeLookahead() throws ParseException
public final void nameLookahead() throws ParseException
public final void primitiveTypeLookahead() throws ParseException
public final void literalLookahead() throws ParseException
public final void explicitConstructorInvocationLookahead() throws ParseException
public final void argumentsLookahead() throws ParseException
public final void expressionLookahead() throws ParseException
public final void assignmentOperatorLookahead() throws ParseException
public final void conditionalExpressionLookahead() throws ParseException
public final void conditionalOrExpressionLookahead() throws ParseException
public final void conditionalAndExpressionLookahead() throws ParseException
public final void inclusiveOrExpressionLookahead() throws ParseException
public final void exclusiveOrExpressionLookahead() throws ParseException
public final void andExpressionLookahead() throws ParseException
public final void equalityExpressionLookahead() throws ParseException
public final void instanceOfExpressionLookahead() throws ParseException
public final void relationalExpressionLookahead() throws ParseException
public final void shiftExpressionLookahead() throws ParseException
public final void additiveExpressionLookahead() throws ParseException
public final void multiplicativeExpressionLookahead() throws ParseException
public final void unaryExpressionLookahead() throws ParseException
public final void preIncrementExpressionLookahead() throws ParseException
public final void preDecrementExpressionLookahead() throws ParseException
public final void unaryExpressionNotPlusMinusLookahead() throws ParseException
public final void postfixExpressionLookahead() throws ParseException
public final void castExpressionLookahead() throws ParseException
public final void primaryExpressionLookahead() throws ParseException
public final void primaryPrefixLookahead() throws ParseException
public final void primarySuffixLookahead() throws ParseException
public final void allocationExpressionLookahead() throws ParseException
public final void classBodyLookahead() throws ParseException
public final void classBodyDeclarationLookahead() throws ParseException
public final void initializerLookahead() throws ParseException
public final void modifiersLookahead() throws ParseException
public final void constructorDeclarationLookahead() throws ParseException
public final void constructorDeclarationLookahead2() throws ParseException
public final void methodDeclarationLookahead() throws ParseException
public final void methodDeclarationLookahead2() throws ParseException
public final void nameListLookahead() throws ParseException
public final void methodDeclaratorLookahead() throws ParseException
public final void formalParametersLookahead() throws ParseException
public final void formalParameterLookahead() throws ParseException
public final void fieldDeclarationLookahead() throws ParseException
public final void variableDeclaratorLookahead() throws ParseException
public final void variableDeclaratorIdLookahead() throws ParseException
public final void blockLookahead() throws ParseException
public final void blockStatementLookahead() throws ParseException
public final void statementLookahead() throws ParseException
public final void labeledStatementLookahead() throws ParseException
public final void statementExpressionLookahead() throws ParseException
public final void switchStatementLookahead() throws ParseException
public final void ifStatementLookahead() throws ParseException
public final void whileStatementLookahead() throws ParseException
public final void doStatementLookahead() throws ParseException
public final void forStatementLookahead() throws ParseException
public final void forInitLookahead() throws ParseException
public final void statementExpressionListLookahead() throws ParseException
public final void breakStatementLookahead() throws ParseException
public final void continueStatementLookahead() throws ParseException
public final void returnStatementLookahead() throws ParseException
public final void throwStatementLookahead() throws ParseException
public final void synchronizedStatementLookahead() throws ParseException
public final void localVariableDeclarationLookahead() throws ParseException
public final void tryStatementLookahead() throws ParseException
public final void arrayDimsAndInitsLookahead() throws ParseException
public final void arrayInitializerLookahead() throws ParseException
public final void variableInitializerLookahead() throws ParseException
public final void classDeclarationLookahead() throws ParseException
public final void classDeclarationLookahead2() throws ParseException
public final void unmodifiedClassDeclarationLookahead() throws ParseException
public final void interfaceDeclarationLookahead() throws ParseException
public final void interfaceDeclarationLookahead2() throws ParseException
public final void unmodifiedInterfaceDeclarationLookahead() throws ParseException
public final void interfaceMemberDeclarationLookahead() throws ParseException
public void ReInit(java.io.InputStream stream)
public void ReInit(java.io.Reader stream)
public void ReInit(ParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public final ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |