|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.janino.Parser
Implementation of a simplified compiler for the JavaTM programming language. The following elements of the Java programming language are implemented:
Inner Class Summary | |
static class |
Parser.ParseException
An exception that reflects an error during parsing. |
Field Summary | |
(package private) static java.lang.String |
cvs_header
|
Constructor Summary | |
Parser(Scanner scanner)
|
Method Summary | |
Java.Atom |
parseAdditiveExpression(Java.Scope enclosingScope)
AdditiveExpression := MultiplicativeExpression { ( '+' | '-' ) MultiplicativeExpression } |
Java.Atom |
parseAndExpression(Java.Scope enclosingScope)
AndExpression := EqualityExpression { '&' EqualityExpression } |
Java.Rvalue[] |
parseArgumentList(Java.Scope enclosingScope)
ArgumentList := Expression { ',' Expression } |
Java.Rvalue[] |
parseArguments(Java.Scope enclosingScope)
Arguments := '(' [ ArgumentList ] ')' |
Java.Rvalue |
parseArrayInitializer(Java.Scope enclosingScope,
Java.ArrayType arrayType)
ArrayInitializer := '{' [ VariableInitializer { ',' VariableInitializer } [ ',' ] '}' |
Java.Atom |
parseAssignmentExpression(Java.Scope enclosingScope)
AssignmentExpression := ConditionalExpression [ AssignmentOperator AssignmentExpression ] AssignmentOperator := '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|=' |
Java.Block |
parseBlock(Java.Scope enclosingScope)
'{' BlockStatements '}' |
Java.BlockStatement |
parseBlockStatement(Java.Block enclosingBlock)
BlockStatement := { Identifier ':' } ( ( Modifiers Type | ModifiersOpt BasicType ) VariableDeclarators ';' | 'class' ... |
java.util.Vector |
parseBlockStatements(Java.Block enclosingBlock)
BlockStatements := { BlockStatement } |
(package private) int |
parseBracketsOpt()
BracketsOpt := { '[' ']' } |
Java.Statement |
parseBreakStatement(Java.Scope enclosingScope)
BreakStatement := 'break' [ Identifier ] ';' |
void |
parseClassBody(Java.ClassDeclaration classDeclaration)
ClassBody := '{' { ClassBodyDeclaration } '}' |
void |
parseClassBodyDeclaration(Java.ClassDeclaration classDeclaration)
ClassBodyDeclaration := ';' | ModifiersOpt ( Block | 'void' Identifier MethodDeclaratorRest | 'class' ClassDeclarationRest | 'interface' InterfaceDeclarationRest | ConstructorDeclarator | Type Identifier ( MethodDeclaratorRest | VariableDeclaratorsRest ) ) |
Java.ClassDeclaration |
parseClassDeclarationRest(Java.Scope enclosingScope,
short modifiers)
ClassDeclarationRest := Identifier [ 'extends' ReferenceType ] [ 'implements' ReferenceTypeList ] ClassBody |
Java.ClassOrInterfaceDeclaration |
parseClassOrInterfaceDeclaration(Java.Scope enclosingScope)
ClassOrInterfaceDeclaration := ModifiersOpt 'class' ClassDeclarationRest | ModifiersOpt 'interface' InterfaceDeclarationRest |
Java.CompilationUnit |
parseCompilationUnit()
CompilationUnit := [ 'package' QualifiedIdentifier ';' ] { ImportDeclaration } { TypeDeclaration } |
Java.Atom |
parseConditionalAndExpression(Java.Scope enclosingScope)
ConditionalAndExpression := InclusiveOrExpression { '&&' InclusiveOrExpression } |
Java.Atom |
parseConditionalExpression(Java.Scope enclosingScope)
ConditionalExpression := ConditionalOrExpression [ '?' |
Java.Atom |
parseConditionalOrExpression(Java.Scope enclosingScope)
ConditionalOrExpression := ConditionalAndExpression { '||' ConditionalAndExpression ] |
Java.ConstructorDeclarator |
parseConstructorDeclarator(Java.ClassDeclaration declaringClass,
short modifiers)
ConstructorDeclarator := FormalParameters [ 'throws' ReferenceTypeList ] '{' [ 'this' Arguments ';' | 'super' Arguments ';' ] BlockStatements '}' |
Java.Statement |
parseContinueStatement(Java.Scope enclosingScope)
ContinueStatement := 'continue' [ Identifier ] ';' |
Java.Rvalue[] |
parseDimExprs(Java.Scope enclosingScope)
DimExprs := { '[' Expression ']' } |
Java.Statement |
parseDoStatement(Java.Scope enclosingScope)
DoStatement := 'do' Statement 'while' '(' Expression ')' ';' |
Java.Atom |
parseEqualityExpression(Java.Scope enclosingScope)
EqualityExpression := RelationalExpression { ( '==' | '! |
Java.Atom |
parseExclusiveOrExpression(Java.Scope enclosingScope)
ExclusiveOrExpression := AndExpression { '^' AndExpression } |
Java.Atom |
parseExpression(Java.Scope enclosingScope)
Expression := AssignmentExpression |
Java.Statement |
parseExpressionStatement(Java.Scope enclosingScope)
ExpressionStatement := Expression |
Java.FormalParameter |
parseFormalParameter(Java.Scope enclosingScope)
FormalParameter := [ 'final' ] Type Identifier BracketsOpt |
Java.FormalParameter[] |
parseFormalParameters(Java.Scope enclosingScope)
FormalParameters := '(' [ FormalParameter { ',' FormalParameter } ] ')' |
Java.Statement |
parseForStatement(Java.Scope enclosingScope)
ForStatement := 'for' '(' [ ForInit ] ';' [ Expression ] ';' [ StatementExpressionList ] ')' Statement |
Java.Statement |
parseIfStatement(Java.Scope enclosingScope)
IfStatement := 'if' '(' Expression ')' Statement [ 'else' Statement ] |
void |
parseImportDeclaration(Java.CompilationUnit compilationUnit)
ImportDeclaration := 'import' Identifier { '.' |
Java.Atom |
parseInclusiveOrExpression(Java.Scope enclosingScope)
InclusiveOrExpression := ExclusiveOrExpression { '|' ExclusiveOrExpression } |
void |
parseInterfaceBody(Java.InterfaceDeclaration interfaceDeclaration)
InterfaceBody := '{' { ';' | ModifiersOpt ( 'void' Identifier MethodDeclaratorRest | 'class' ClassDeclarationRest | 'interface' InterfaceDeclarationRest | Type Identifier ( MethodDeclaratorRest | VariableDeclaratorsRest ) ) } '}' |
Java.InterfaceDeclaration |
parseInterfaceDeclarationRest(Java.Scope enclosingScope,
short modifiers)
InterfaceDeclarationRest := Identifier [ 'extends' ReferenceTypeList ] InterfaceBody |
Java.Statement |
parseLabeledStatement(Java.Scope enclosingScope)
LabeledStatement := Identifier ':' Statement |
Java.Atom |
parseLiteral()
|
Java.Block |
parseMethodBody(Java.FunctionDeclarator declaringFunction)
MethodBody := Block |
Java.MethodDeclarator |
parseMethodDeclaratorRest(Java.ClassOrInterfaceDeclaration declaringClassOrInterface,
short modifiers,
Java.Type type,
java.lang.String name)
MethodDeclaratorRest := FormalParameters | [ 'throws' ReferenceTypeList ] ( ';' | MethodBody ) |
short |
parseModifiersOpt()
ModifiersOpt := { 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native' | 'synchronized' | 'transient' | 'volatile' | 'strictfp' |
Java.Atom |
parseMultiplicativeExpression(Java.Scope enclosingScope)
MultiplicativeExpression := UnaryExpression { ( '*' | '/' | '%' ) UnaryExpression } |
Java.Atom |
parsePrimary(Java.Scope enclosingScope)
Primary := '(' PrimitiveType { '[]' } ')' UnaryExpression | // CastExpression 15.16 '(' Expression ')' UnaryExpression | // CastExpression 15.16 '(' Expression ')' | // ParenthesizedExpression 15.8.5 Literal | // Literal 15.8.1 Name | // AmbiguousName Name Arguments | // MethodInvocation Name '[]' { '[]' } | // ArrayType 10.1 Name '[]' { '[]' } '.' |
java.lang.String[] |
parseQualifiedIdentifier()
QualifiedIdentifier := Identifier { '.' |
Java.ReferenceType |
parseReferenceType(Java.Scope scope)
ReferenceType := QualifiedIdentifier |
Java.ReferenceType[] |
parseReferenceTypeList(Java.Scope scope)
ReferenceTypeList := ReferenceType { ',' ReferenceType } |
Java.Atom |
parseRelationalExpression(Java.Scope enclosingScope)
RelationalExpression := ShiftExpression { ( ( '<' | '>' | '<=' | '>=' ) ShiftExpression ) | ( 'instanceof' ReferenceType ) } |
Java.Statement |
parseReturnStatement(Java.Scope enclosingScope)
ReturnStatement := 'return' [ Expression ] ';' |
Java.Atom |
parseSelector(Java.Scope enclosingScope,
Java.Atom atom)
Selector := '.' |
Java.Atom |
parseShiftExpression(Java.Scope enclosingScope)
ShiftExpression := AdditiveExpression { ( '<<' | '>>' | '>>>' ) AdditiveExpression } |
Java.Statement |
parseStatement(Java.Scope enclosingScope)
Statement := LabeledStatement | Block | IfStatement | ForStatement | WhileStatement | DoStatement | TryStatement | 'switch' ... |
Java.BlockStatement |
parseStatementExpressionList(Java.Scope enclosingScope)
StatementExpressionList := ExpressionStatement { ',' ExpressionStatement } |
Java.Statement |
parseSwitchStatement(Java.Scope enclosingScope)
SwitchStatement := 'switch' '(' Expression ')' '{' { SwitchLabels BlockStatements } '}' SwitchLabels := SwitchLabels { SwitchLabels } SwitchLabel := 'case' Expression ':' | 'default' ':' |
Java.Statement |
parseSynchronizedStatement(Java.Scope enclosingScope)
SynchronizedStatement := 'synchronized' '(' expression ')' Block |
Java.Statement |
parseThrowStatement(Java.Scope enclosingScope)
ThrowStatement := 'throw' Expression ';' |
Java.Statement |
parseTryStatement(Java.Scope enclosingScope)
TryStatement := 'try' Block Catches [ Finally ] | 'try' Block Finally Catches := CatchClause { CatchClause } CatchClause := 'catch' '(' FormalParameter ')' Block Finally := 'finally' Block |
Java.Type |
parseType(Java.Scope scope)
Type := ( 'byte' | 'short' | 'char' | 'int' | 'long' | 'float' | 'double' | 'boolean' | QualifiedIdentifier ) { '[' ']' } |
Java.ClassOrInterfaceDeclaration |
parseTypeDeclaration(Java.CompilationUnit compilationUnit)
TypeDeclaration := ClassOrInterfaceDeclaration |
Java.Atom |
parseUnaryExpression(Java.Scope enclosingScope)
UnaryExpression := { PrefixOperator } Primary { Selector } { PostfixOperator } PrefixOperator := '++' | '--' | '+' | '-' | '~' | '!' |
Java.VariableDeclarator |
parseVariableDeclarator(Java.Scope enclosingScope,
Java.Type type)
VariableDeclarator := Identifier VariableDeclaratorRest |
Java.VariableDeclarator |
parseVariableDeclaratorRest(Java.Scope enclosingScope,
Java.Type type,
java.lang.String name)
VariableDeclaratorRest := { '[' ']' } [ '=' VariableInitializer ] |
Java.VariableDeclarator[] |
parseVariableDeclarators(Java.Scope enclosingScope,
Java.Type type)
VariableDeclarators := VariableDeclarator { ',' VariableDeclarator } |
Java.VariableDeclarator[] |
parseVariableDeclaratorsRest(Java.Scope enclosingScope,
Java.Type type,
java.lang.String name)
VariableDeclaratorsRest := VariableDeclaratorRest { ',' VariableDeclarator } |
Java.Rvalue |
parseVariableInitializer(Java.Scope enclosingScope,
Java.Type type)
VariableInitializer := ArrayInitializer | Expression |
Java.Statement |
parseWhileStatement(Java.Scope enclosingScope)
WhileStatement := 'while' '(' Expression ')' Statement |
Methods inherited from class java.lang.Object |
|
Field Detail |
static final java.lang.String cvs_header
Constructor Detail |
public Parser(Scanner scanner)
Method Detail |
public Java.CompilationUnit parseCompilationUnit() throws Parser.ParseException, Scanner.ScanException, java.io.IOException
CompilationUnit := [ 'package' QualifiedIdentifier ';' ] { ImportDeclaration } { TypeDeclaration }
public void parseImportDeclaration(Java.CompilationUnit compilationUnit) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ImportDeclaration := 'import' Identifier { '.' Identifier } [ '.' '*' ] ';'
public java.lang.String[] parseQualifiedIdentifier() throws Parser.ParseException, Scanner.ScanException, java.io.IOException
public Java.ClassOrInterfaceDeclaration parseTypeDeclaration(Java.CompilationUnit compilationUnit) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
TypeDeclaration := ClassOrInterfaceDeclaration
public Java.ClassOrInterfaceDeclaration parseClassOrInterfaceDeclaration(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ClassOrInterfaceDeclaration := ModifiersOpt 'class' ClassDeclarationRest | ModifiersOpt 'interface' InterfaceDeclarationRest
public short parseModifiersOpt() throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ModifiersOpt := { 'public' | 'protected' | 'private' | 'static' | 'abstract' | 'final' | 'native' | 'synchronized' | 'transient' | 'volatile' | 'strictfp'
public Java.ClassDeclaration parseClassDeclarationRest(Java.Scope enclosingScope, short modifiers) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ClassDeclarationRest := Identifier [ 'extends' ReferenceType ] [ 'implements' ReferenceTypeList ] ClassBody
public void parseClassBody(Java.ClassDeclaration classDeclaration) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ClassBody := '{' { ClassBodyDeclaration } '}'
public void parseClassBodyDeclaration(Java.ClassDeclaration classDeclaration) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ClassBodyDeclaration := ';' | ModifiersOpt ( Block | 'void' Identifier MethodDeclaratorRest | 'class' ClassDeclarationRest | 'interface' InterfaceDeclarationRest | ConstructorDeclarator | Type Identifier ( MethodDeclaratorRest | VariableDeclaratorsRest ) )
public Java.InterfaceDeclaration parseInterfaceDeclarationRest(Java.Scope enclosingScope, short modifiers) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
InterfaceDeclarationRest := Identifier [ 'extends' ReferenceTypeList ] InterfaceBody
public void parseInterfaceBody(Java.InterfaceDeclaration interfaceDeclaration) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
InterfaceBody := '{' { ';' | ModifiersOpt ( 'void' Identifier MethodDeclaratorRest | 'class' ClassDeclarationRest | 'interface' InterfaceDeclarationRest | Type Identifier ( MethodDeclaratorRest | VariableDeclaratorsRest ) ) } '}'
public Java.ConstructorDeclarator parseConstructorDeclarator(Java.ClassDeclaration declaringClass, short modifiers) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ConstructorDeclarator := FormalParameters [ 'throws' ReferenceTypeList ] '{' [ 'this' Arguments ';' | 'super' Arguments ';' ] BlockStatements '}'
public Java.MethodDeclarator parseMethodDeclaratorRest(Java.ClassOrInterfaceDeclaration declaringClassOrInterface, short modifiers, Java.Type type, java.lang.String name) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
MethodDeclaratorRest := FormalParameters | [ 'throws' ReferenceTypeList ] ( ';' | MethodBody )
public Java.Rvalue parseVariableInitializer(Java.Scope enclosingScope, Java.Type type) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
VariableInitializer := ArrayInitializer | Expression
public Java.Rvalue parseArrayInitializer(Java.Scope enclosingScope, Java.ArrayType arrayType) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ArrayInitializer := '{' [ VariableInitializer { ',' VariableInitializer } [ ',' ] '}'
public Java.FormalParameter[] parseFormalParameters(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
FormalParameters := '(' [ FormalParameter { ',' FormalParameter } ] ')'
public Java.FormalParameter parseFormalParameter(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
FormalParameter := [ 'final' ] Type Identifier BracketsOpt
int parseBracketsOpt() throws Parser.ParseException, Scanner.ScanException, java.io.IOException
BracketsOpt := { '[' ']' }
public Java.Block parseMethodBody(Java.FunctionDeclarator declaringFunction) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
MethodBody := Block
public Java.Block parseBlock(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
'{' BlockStatements '}'
public java.util.Vector parseBlockStatements(Java.Block enclosingBlock) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
BlockStatements := { BlockStatement }
public Java.BlockStatement parseBlockStatement(Java.Block enclosingBlock) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
BlockStatement := { Identifier ':' } ( ( Modifiers Type | ModifiersOpt BasicType ) VariableDeclarators ';' | 'class' ... | Statement | Expression ';' | Expression [ Brackets ] VariableDeclarators ';' (1) )(1) "Expression" must pose a type.
public Java.VariableDeclarator[] parseVariableDeclarators(Java.Scope enclosingScope, Java.Type type) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
VariableDeclarators := VariableDeclarator { ',' VariableDeclarator }
public Java.VariableDeclarator[] parseVariableDeclaratorsRest(Java.Scope enclosingScope, Java.Type type, java.lang.String name) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
VariableDeclaratorsRest := VariableDeclaratorRest { ',' VariableDeclarator }
public Java.VariableDeclarator parseVariableDeclarator(Java.Scope enclosingScope, Java.Type type) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
VariableDeclarator := Identifier VariableDeclaratorRest
public Java.VariableDeclarator parseVariableDeclaratorRest(Java.Scope enclosingScope, Java.Type type, java.lang.String name) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
VariableDeclaratorRest := { '[' ']' } [ '=' VariableInitializer ]
public Java.Statement parseStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
Statement := LabeledStatement | Block | IfStatement | ForStatement | WhileStatement | DoStatement | TryStatement | 'switch' ... | 'synchronized' ... | ReturnStatement | ThrowStatement | BreakStatement | ContinueStatement | ';' | ExpressionStatement
public Java.Statement parseLabeledStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
LabeledStatement := Identifier ':' Statement
public Java.Statement parseIfStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
IfStatement := 'if' '(' Expression ')' Statement [ 'else' Statement ]
public Java.Statement parseForStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ForStatement := 'for' '(' [ ForInit ] ';' [ Expression ] ';' [ StatementExpressionList ] ')' Statement
public Java.Statement parseWhileStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
WhileStatement := 'while' '(' Expression ')' Statement
public Java.Statement parseDoStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
DoStatement := 'do' Statement 'while' '(' Expression ')' ';'
public Java.Statement parseTryStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
TryStatement := 'try' Block Catches [ Finally ] | 'try' Block Finally Catches := CatchClause { CatchClause } CatchClause := 'catch' '(' FormalParameter ')' Block Finally := 'finally' Block
public Java.Statement parseSwitchStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
SwitchStatement := 'switch' '(' Expression ')' '{' { SwitchLabels BlockStatements } '}' SwitchLabels := SwitchLabels { SwitchLabels } SwitchLabel := 'case' Expression ':' | 'default' ':'
public Java.Statement parseSynchronizedStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
SynchronizedStatement := 'synchronized' '(' expression ')' Block
public Java.Statement parseReturnStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ReturnStatement := 'return' [ Expression ] ';'
public Java.Statement parseThrowStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ThrowStatement := 'throw' Expression ';'
public Java.Statement parseBreakStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
BreakStatement := 'break' [ Identifier ] ';'
public Java.Statement parseContinueStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ContinueStatement := 'continue' [ Identifier ] ';'
public Java.BlockStatement parseStatementExpressionList(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
StatementExpressionList := ExpressionStatement { ',' ExpressionStatement }
public Java.Type parseType(Java.Scope scope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
Type := ( 'byte' | 'short' | 'char' | 'int' | 'long' | 'float' | 'double' | 'boolean' | QualifiedIdentifier ) { '[' ']' }
public Java.ReferenceType parseReferenceType(Java.Scope scope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ReferenceType := QualifiedIdentifier
public Java.ReferenceType[] parseReferenceTypeList(Java.Scope scope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ReferenceTypeList := ReferenceType { ',' ReferenceType }
public Java.Atom parseExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
Expression := AssignmentExpression
public Java.Atom parseAssignmentExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
AssignmentExpression := ConditionalExpression [ AssignmentOperator AssignmentExpression ] AssignmentOperator := '=' | '*=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|='
public Java.Atom parseConditionalExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ConditionalExpression := ConditionalOrExpression [ '?' Expression ':' ConditionalExpression ]
public Java.Atom parseConditionalOrExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ConditionalOrExpression := ConditionalAndExpression { '||' ConditionalAndExpression ]
public Java.Atom parseConditionalAndExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ConditionalAndExpression := InclusiveOrExpression { '&&' InclusiveOrExpression }
public Java.Atom parseInclusiveOrExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
InclusiveOrExpression := ExclusiveOrExpression { '|' ExclusiveOrExpression }
public Java.Atom parseExclusiveOrExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ExclusiveOrExpression := AndExpression { '^' AndExpression }
public Java.Atom parseAndExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
AndExpression := EqualityExpression { '&' EqualityExpression }
public Java.Atom parseEqualityExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
EqualityExpression := RelationalExpression { ( '==' | '!=' ) RelationalExpression }
public Java.Atom parseRelationalExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
RelationalExpression := ShiftExpression { ( ( '<' | '>' | '<=' | '>=' ) ShiftExpression ) | ( 'instanceof' ReferenceType ) }
public Java.Atom parseShiftExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ShiftExpression := AdditiveExpression { ( '<<' | '>>' | '>>>' ) AdditiveExpression }
public Java.Atom parseAdditiveExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
AdditiveExpression := MultiplicativeExpression { ( '+' | '-' ) MultiplicativeExpression }
public Java.Atom parseMultiplicativeExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
MultiplicativeExpression := UnaryExpression { ( '*' | '/' | '%' ) UnaryExpression }
public Java.Atom parseUnaryExpression(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
UnaryExpression := { PrefixOperator } Primary { Selector } { PostfixOperator } PrefixOperator := '++' | '--' | '+' | '-' | '~' | '!' PostfixOperator := '++' | '--'
public Java.Atom parsePrimary(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
Primary := '(' PrimitiveType { '[]' } ')' UnaryExpression | // CastExpression 15.16 '(' Expression ')' UnaryExpression | // CastExpression 15.16 '(' Expression ')' | // ParenthesizedExpression 15.8.5 Literal | // Literal 15.8.1 Name | // AmbiguousName Name Arguments | // MethodInvocation Name '[]' { '[]' } | // ArrayType 10.1 Name '[]' { '[]' } '.' 'class' | // ClassLiteral 15.8.2 'this' | // This 15.8.3 'super' '.' Identifier | // SuperclassFieldAccess 15.11.2 'super' '.' Identifier Arguments | // SuperclassMethodInvocation 15.12.4.9 'new' ReferenceType Arguments [ ClassBody ] | // ClassInstanceCreationExpression 15.9 'new' Type DimExprs { '[]' } | // ArrayCreationExpression 15.10 'new' ArrayType ArrayInitializer | // ArrayInitializer 10.6 BasicType { '[]' } | // Type BasicType { '[]' } '.' 'class' | // ClassLiteral 15.8.2 'void' '.' 'class' // ClassLiteral 15.8.2
public Java.Atom parseSelector(Java.Scope enclosingScope, Java.Atom atom) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
Selector := '.' Identifier | // FieldAccess 15.11.1 '.' Identifier Arguments | // MethodInvocation '.' 'this' // QualifiedThis 15.8.4 '.' 'super' '.' Identifier | // SuperclassFieldReference '.' 'super' '.' Identifier Arguments | // SuperclassMethodInvocation 15.12.4.9 '.' 'new' Identifier Arguments [ ClassBody ] | // QualifiedClassInstanceCreationExpression 15.9 '.' 'class' '[' Expression ']' // ArrayAccessExpression 15.13
public Java.Rvalue[] parseDimExprs(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
DimExprs := { '[' Expression ']' }
public Java.Rvalue[] parseArguments(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
Arguments := '(' [ ArgumentList ] ')'
public Java.Rvalue[] parseArgumentList(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ArgumentList := Expression { ',' Expression }
public Java.Atom parseLiteral() throws Parser.ParseException, Scanner.ScanException, java.io.IOException
public Java.Statement parseExpressionStatement(Java.Scope enclosingScope) throws Parser.ParseException, Scanner.ScanException, java.io.IOException
ExpressionStatement := Expression
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |