2025-09-25 21:49:56 -06:00
|
|
|
parser grammar ExprSyntactic;
|
|
|
|
|
|
|
|
|
|
options {
|
|
|
|
|
tokenVocab=ExprLexer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
identifier: IDENTIFIER;
|
|
|
|
|
|
2025-09-26 19:21:46 -06:00
|
|
|
qualifiedIdentifier: identifier (Dot identifier)*;
|
2025-09-25 21:49:56 -06:00
|
|
|
|
|
|
|
|
literal: IntegerLiteral
|
|
|
|
|
| FloatingPointLiteral
|
|
|
|
|
| CharacterLiteral
|
|
|
|
|
| StringLiteral
|
|
|
|
|
| BooleanLiteral
|
|
|
|
|
| NullLiteral;
|
|
|
|
|
|
2025-09-26 19:21:46 -06:00
|
|
|
expression: expression1 (assignmentOperator expression1)?;
|
2025-09-25 21:49:56 -06:00
|
|
|
|
|
|
|
|
assignmentOperator: Assignment
|
|
|
|
|
| AddAssign
|
|
|
|
|
| SubtractAssign
|
|
|
|
|
| MultiplyAssign
|
|
|
|
|
| DivideAssign
|
|
|
|
|
| BitwiseANDAssign
|
|
|
|
|
| BitwiseORAssign
|
|
|
|
|
| BitwiseXORAssign
|
|
|
|
|
| RemainderAssign
|
|
|
|
|
| LeftShiftAssign
|
|
|
|
|
| SighnedRightShiftAssign
|
|
|
|
|
| UnsighnedRightShiftAssign;
|
|
|
|
|
|
2025-09-26 19:21:46 -06:00
|
|
|
type: identifier (Dot identifier)* bracketsOpt
|
2025-09-25 21:49:56 -06:00
|
|
|
| basicType;
|
|
|
|
|
|
|
|
|
|
statementExpression: expression;
|
|
|
|
|
|
|
|
|
|
constantExpression: expression;
|
|
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
expression1: expression2 (expression1Rest)?;
|
2025-09-25 21:49:56 -06:00
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
expression1Rest: Question expression Colon expression1;
|
2025-09-25 21:49:56 -06:00
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
expression2: expression3 expression2Rest?;
|
2025-09-25 23:06:20 -06:00
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
expression2Rest: (infixop expression3)+
|
|
|
|
|
| InstanceOf type;
|
2025-09-25 23:06:20 -06:00
|
|
|
|
|
|
|
|
infixop: ConditionalOR
|
|
|
|
|
| ConditionalAND
|
|
|
|
|
| BitwiseOR
|
|
|
|
|
| BitwiseXOR
|
|
|
|
|
| BitwiseAND
|
2025-09-27 13:28:28 -06:00
|
|
|
| EqualTo
|
2025-09-25 23:06:20 -06:00
|
|
|
| NotEqualTO
|
|
|
|
|
| LessThan
|
|
|
|
|
| GreterThan
|
|
|
|
|
| LessThanEqualTo
|
|
|
|
|
| GreaterThanEqualTo
|
|
|
|
|
| LeftShift
|
|
|
|
|
| SignedRightShift
|
|
|
|
|
| UnsignedRightShift
|
|
|
|
|
| Addition
|
|
|
|
|
| Subtraction
|
|
|
|
|
| Multiplication
|
|
|
|
|
| Division
|
|
|
|
|
| Remainder;
|
|
|
|
|
|
|
|
|
|
expression3: prefixOp expression3 // Recursion
|
2025-09-27 13:28:28 -06:00
|
|
|
| (expression | type) expression3
|
|
|
|
|
| primary (selector)* (postfixOp)*;
|
2025-09-25 23:06:20 -06:00
|
|
|
|
|
|
|
|
primary: (expression)
|
2025-09-26 19:21:46 -06:00
|
|
|
| This (arguments)?
|
2025-09-25 23:06:20 -06:00
|
|
|
| Super superSuffix
|
|
|
|
|
| literal
|
|
|
|
|
| New creator
|
2025-09-26 19:21:46 -06:00
|
|
|
| identifier (Dot identifier)* (identifierSuffix)?
|
|
|
|
|
| basicType bracketsOpt Dot Class
|
|
|
|
|
| Void Dot Class;
|
2025-09-25 23:06:20 -06:00
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
////TEST
|
|
|
|
|
//primary: primaryAtom primarySuffix*
|
|
|
|
|
// | New creator ;
|
|
|
|
|
//
|
|
|
|
|
//primaryAtom: ParenthesesLeft expression ParenthesesRight
|
|
|
|
|
// | This
|
|
|
|
|
// | literal
|
|
|
|
|
// | qualifiedIdentifier
|
|
|
|
|
// | qualifiedIdentifier Dot This
|
|
|
|
|
// | basicType bracketsOpt Dot Class
|
|
|
|
|
// | Void Dot Class
|
|
|
|
|
// | Super;
|
|
|
|
|
//
|
|
|
|
|
//// All selectors / postfix pieces (no recursion back to primary)
|
|
|
|
|
//primarySuffix: Dot Identifier arguments?
|
|
|
|
|
// | SquareBracketLeft expression SquareBracketRight
|
|
|
|
|
// | Dot Class;
|
|
|
|
|
////END test
|
|
|
|
|
|
2025-09-26 23:52:51 -06:00
|
|
|
identifierSuffix: SquareBracketLeft SquareBracketRight bracketsOpt Dot Class //Case []...'.'class
|
|
|
|
|
|SquareBracketLeft expression SquareBracketRight //arr[5]
|
|
|
|
|
|arguments
|
|
|
|
|
|Dot (Class | This | Super arguments New innerCreator);
|
2025-09-25 23:06:20 -06:00
|
|
|
|
|
|
|
|
prefixOp: Increment
|
|
|
|
|
| Decrement
|
|
|
|
|
| LogicalComplement
|
|
|
|
|
| BitWiseComplement
|
|
|
|
|
| Addition
|
|
|
|
|
| Subtraction;
|
|
|
|
|
|
|
|
|
|
postfixOp: Increment | Decrement;
|
|
|
|
|
|
2025-09-26 23:52:51 -06:00
|
|
|
selector: Dot identifier (arguments)?
|
|
|
|
|
| Dot This
|
|
|
|
|
| Dot Super superSuffix
|
|
|
|
|
| Dot New innerCreator
|
|
|
|
|
| SquareBracketLeft expression SquareBracketRight;
|
2025-09-25 23:06:20 -06:00
|
|
|
|
|
|
|
|
superSuffix: arguments
|
2025-09-26 23:52:51 -06:00
|
|
|
| Dot identifier (arguments)?;
|
2025-09-27 13:28:28 -06:00
|
|
|
//primitives
|
2025-09-25 23:06:20 -06:00
|
|
|
basicType: Byte
|
|
|
|
|
| Short
|
|
|
|
|
| Char
|
|
|
|
|
| Int
|
|
|
|
|
| Long
|
|
|
|
|
| Float
|
|
|
|
|
| Double
|
|
|
|
|
| Boolean;
|
2025-09-26 23:52:51 -06:00
|
|
|
//TODO: REVIEW ANYTHING BEFORE THIS POINT FOR POTENTIAL CONFUSSION ON TERMINAL SYMBOLS AND GRAMMAR
|
2025-09-26 19:21:46 -06:00
|
|
|
argumentsOpt: (arguments)?;
|
2025-09-25 23:06:20 -06:00
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
arguments: ParenthesesLeft (expression (Comma expression)*)? ParenthesesRight;
|
2025-09-25 23:06:20 -06:00
|
|
|
|
2025-09-26 23:52:51 -06:00
|
|
|
bracketsOpt: (SquareBracketLeft SquareBracketRight)*;
|
2025-09-25 23:06:20 -06:00
|
|
|
|
|
|
|
|
creator: qualifiedIdentifier ( arrayCreatorRest | classCreatorRest);
|
|
|
|
|
|
|
|
|
|
innerCreator: identifier classCreatorRest;
|
|
|
|
|
|
2025-09-26 23:52:51 -06:00
|
|
|
arrayCreatorRest: SquareBracketLeft SquareBracketRight bracketsOpt arrayInitializer
|
|
|
|
|
| SquareBracketLeft expression SquareBracketRight (SquareBracketLeft expression SquareBracketRight)*;
|
|
|
|
|
classCreatorRest: arguments (classBody)?;
|
|
|
|
|
|
|
|
|
|
arrayInitializer: CurlyBracketLeft (variableInitializer(Comma variableInitializer)*(Comma)?)? CurlyBracketRight;
|
|
|
|
|
|
|
|
|
|
variableInitializer: arrayInitializer
|
|
|
|
|
|expression;
|
|
|
|
|
|
|
|
|
|
parExpression: ParenthesesLeft expression ParenthesesRight;
|
|
|
|
|
|
|
|
|
|
block: CurlyBracketLeft blockStatements CurlyBracketRight;
|
|
|
|
|
|
|
|
|
|
blockStatements: (blockStatement)*;
|
|
|
|
|
|
|
|
|
|
blockStatement: localVariableDeclarationStatement
|
|
|
|
|
|classOrInterfaceDeclaration
|
2025-09-27 13:28:28 -06:00
|
|
|
|(identifier Colon)? statement;
|
2025-09-26 23:52:51 -06:00
|
|
|
|
|
|
|
|
localVariableDeclarationStatement: (Final)? type variableDeclarators;
|
|
|
|
|
|
|
|
|
|
statement: block
|
|
|
|
|
| If parExpression statement (Else statement)?
|
2025-09-27 13:28:28 -06:00
|
|
|
| For ParenthesesLeft forInit? Semicolon (expression)? Semicolon forUpdate? ParenthesesRight statement
|
2025-09-26 23:52:51 -06:00
|
|
|
| While parExpression statement
|
|
|
|
|
| Do statement While parExpression Semicolon
|
|
|
|
|
| Try block (catches | (catches)? Finally block)
|
2025-09-27 13:28:28 -06:00
|
|
|
| Switch parExpression CurlyBracketLeft switchBlockStatementGroups? CurlyBracketRight
|
2025-09-26 23:52:51 -06:00
|
|
|
| Synchronized parExpression block
|
|
|
|
|
| Return (expression)? Semicolon
|
|
|
|
|
| Throw expression Semicolon
|
|
|
|
|
| Break (identifier)? Semicolon
|
|
|
|
|
| Continue (identifier)? Semicolon
|
|
|
|
|
| Semicolon
|
|
|
|
|
| expressionStatement
|
|
|
|
|
| identifier Colon statement;
|
|
|
|
|
|
|
|
|
|
catches: catchClause (catchClause)*;
|
|
|
|
|
|
|
|
|
|
catchClause: Catch ParenthesesLeft formalParameter ParanthesesRight block;
|
|
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
switchBlockStatementGroups: (switchBlockStatementGroup)*;
|
2025-09-26 23:52:51 -06:00
|
|
|
|
|
|
|
|
switchBlockStatementGroup: switchLabel blockStatements;
|
|
|
|
|
|
|
|
|
|
switchLabel: Case constantExpression Colon
|
|
|
|
|
| Default Colon;
|
|
|
|
|
moreStatementExpressions: (Comma statementExpression)*;
|
|
|
|
|
|
|
|
|
|
forInit: statementExpression moreStatementExpressions
|
|
|
|
|
| (Final)? type variableDeclarators;
|
|
|
|
|
|
|
|
|
|
forUpdate: statementExpression moreStatementExpressions;
|
|
|
|
|
|
|
|
|
|
modifiersOpt: (modifier)*;
|
|
|
|
|
|
|
|
|
|
modifier: Public
|
|
|
|
|
| Protected
|
|
|
|
|
| Private
|
|
|
|
|
| Static
|
|
|
|
|
| Abstract
|
|
|
|
|
| Final
|
|
|
|
|
| Native
|
|
|
|
|
| Synchronized
|
|
|
|
|
| Transient
|
|
|
|
|
| Volatile
|
|
|
|
|
| Strictfp;
|
|
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
variableDeclarators: variableDeclarator (Comma variableDeclarator)*;
|
2025-09-26 23:52:51 -06:00
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
variableDeclaratorsRest: variableDeclaratorRest (Comma variableDeclarator)*;
|
2025-09-26 23:52:51 -06:00
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
constantDeclaratorsRest: constantDeclaratorRest (Comma constantDeclarator)*;
|
2025-09-26 23:52:51 -06:00
|
|
|
|
|
|
|
|
variableDeclarator: identifier variableDeclaratorsRest;
|
|
|
|
|
|
|
|
|
|
constantDeclarator: identifier constantDeclaratorRest;
|
|
|
|
|
|
2025-09-27 13:28:28 -06:00
|
|
|
variableDeclaratorRest: bracketsOpt (Assignment variableInitializer)?;
|
|
|
|
|
|
|
|
|
|
constantDeclaratorRest: bracketsOpt Assignment variableInitializer;
|
|
|
|
|
|
|
|
|
|
variableDeclaratorId: identifier bracketsOpt;
|
|
|
|
|
|
|
|
|
|
compilationUnit: (Package qualifiedIdentifier Semicolon)? (importDeclaration)*;
|
|
|
|
|
|
|
|
|
|
importDeclaration: Import identifier (Dot identifier)*(importDeclaration Multiplication)? Semicolon;
|
|
|
|
|
|
|
|
|
|
typeDeclaration: classOrInterfaceDeclaration Semicolon;
|
|
|
|
|
|
|
|
|
|
classOrInterfaceDeclaration: modifiersOpt (classDeclaration | interfaceDeclaration);
|
|
|
|
|
|
|
|
|
|
classDeclaration: Class identifier (Extends type)? (Implements typeList)? classBody;
|
|
|
|
|
|
|
|
|
|
interfaceDeclaration: Interface identifier (Extends typeList)? interfaceBody;
|
|
|
|
|
|
|
|
|
|
typeList: type (Semicolon type)*;
|
|
|
|
|
|
|
|
|
|
classBody: CurlyBracketLeft (classBodyDeclaration)* CurlyBracketRight;
|
|
|
|
|
|
|
|
|
|
interfaceBody: CurlyBracketLeft (interfaceBodyDeclaration)* CurlyBracketRight;
|
|
|
|
|
|
|
|
|
|
classBodyDeclaration: Semicolon
|
|
|
|
|
| (Static)? block
|
|
|
|
|
| modifiersOpt memberDecl;
|
|
|
|
|
memberDecl: methodOrFieldDecl
|
|
|
|
|
| Void identifier methodDeclaratorRest
|
|
|
|
|
| identifier constructorDeclaratorRest
|
|
|
|
|
| classOrInterfaceDeclaration;
|
|
|
|
|
|
|
|
|
|
methodOrFieldDecl: type identifier methodOrFieldRest;
|
|
|
|
|
|
|
|
|
|
methodOrFieldRest: variableDeclaratorRest
|
|
|
|
|
|methodDeclaratorRest;
|
|
|
|
|
|
|
|
|
|
interfaceBodyDeclaration: Semicolon
|
|
|
|
|
| modifiersOpt interfaceMemberDecl;
|
|
|
|
|
|
|
|
|
|
interfaceMemberDecl: interfaceMethodOrFieldDecl
|
|
|
|
|
| Void identifier voidInterfaceMethodDeclaratorRest
|
|
|
|
|
| classOrInterfaceDeclaration;
|
|
|
|
|
|
|
|
|
|
interfaceMethodOrFieldDecl: type identifier interfaceMethodOrFieldRest;
|
|
|
|
|
|
|
|
|
|
interfaceMethodOrFieldRest: constantDeclaratorRest Semicolon
|
|
|
|
|
| interfaceMethodDeclaratorRest;
|
|
|
|
|
|
|
|
|
|
methodDeclaratorRest: formalParameters bracketsOpt (Throws qualifiedIdentifierList)?(methodBody | Semicolon);
|
|
|
|
|
|
|
|
|
|
voidMethodDeclaratorRest: formalParameters (Throws qualifiedIdentifierList)? (methodBody | Semicolon);
|
|
|
|
|
|
|
|
|
|
interfaceMethodDeclaratorRest: formalParameters bracketsOpt (Throws qualifiedIdentifierList)? Semicolon;
|
|
|
|
|
|
|
|
|
|
voidInterfaceMethodDeclaratorRest: formalParameters (Throws qualifiedIdentifierList)?;
|
|
|
|
|
|
|
|
|
|
constructorDeclaratorRest: formalParameters (Throws qualifiedIdentifierList)? methodBody;
|
|
|
|
|
|
|
|
|
|
qualifiedIdentifierList: qualifiedIdentifier (Semicolon qualifiedIdentifier)*;
|
|
|
|
|
|
|
|
|
|
formalParameters:ParenthesesLeft (formalParameters(Semicolon formalParameter))? ParanthesesRight;
|
|
|
|
|
|
|
|
|
|
formalParameter: (Final)? type variableDeclaratorId;
|
|
|
|
|
|
|
|
|
|
methodBody: block;
|
|
|
|
|
|
|
|
|
|
//Things not defined within the final chapter of JSL2
|
|
|
|
|
expressionStatement: statementExpression Semicolon;
|
|
|
|
|
|
|
|
|
|
asssignmentExpression: conditionalExpression
|
|
|
|
|
| assignment;
|
|
|
|
|
assignment: leftHandSide assignmentOperator assignmentExpression;
|
|
|
|
|
|
|
|
|
|
leftHandSide: expressionName
|
|
|
|
|
| fieldAccess
|
|
|
|
|
| arrayAccess;
|
|
|
|
|
|
|
|
|
|
conditionalExpression: conditionalOrExpression
|
|
|
|
|
| conditionalOrExpression Question expression Colon conditionalExpression;
|
|
|
|
|
|
|
|
|
|
conditionalOrExpression:
|
|
|
|
|
conditionalAndExpression
|
|
|
|
|
|conditionalOrExpression ConditionalOr conditionalAndExpression;
|
|
|
|
|
//Conditional And (&&)
|
|
|
|
|
conditionalAndExpression:
|
|
|
|
|
inclusiveOrExpression
|
|
|
|
|
|conditionalAndExpression ConditionalAnd inclusiveOrExpression;
|
|
|
|
|
inclusiveOrExpression:
|
|
|
|
|
exclusiveOrExpression
|
|
|
|
|
inclusiveOrExpression BitwiseOR exclusiveOrExpression;
|
|
|
|
|
//Assignment operators
|
|
|
|
|
assignmentExpression:conditionalExpression
|
|
|
|
|
|assignment;
|
|
|
|
|
|
|
|
|
|
relationalExpression:
|
|
|
|
|
shiftExpression
|
|
|
|
|
|relationalExpression LessThan shiftExpression
|
|
|
|
|
|relationalExpression GreaterThan shiftExpression
|
|
|
|
|
|relationalExpression LessOrEqual shiftExpression
|
|
|
|
|
|relationalExpression GreaterOrEqual shiftExpression
|
|
|
|
|
|relationalExpression InstanceOf referenceType;
|
|
|
|
|
|
|
|
|
|
//ShiftExpression:
|
|
|
|
|
shiftExpression: additiveExpression
|
|
|
|
|
|shiftExpression LeftShift additiveExpression
|
|
|
|
|
|shiftExpression SignedRightShift additiveExpression
|
|
|
|
|
|shiftExpression UnsignedRightShift additiveExpression;
|
|
|
|
|
//Additive Operators
|
|
|
|
|
additiveExpression: multiplicativeExpression
|
|
|
|
|
| additiveExpression Addition multiplicativeExpression
|
|
|
|
|
| additiveExpression Subtraction multiplicativeExpression;
|
|
|
|
|
|
|
|
|
|
//Multiplicative Operators
|
|
|
|
|
multiplicativeExpression: unaryExpression
|
|
|
|
|
| multiplicativeExpression Multiplication unaryExpression
|
|
|
|
|
| multiplicativeExpression Division unaryExpression
|
|
|
|
|
| multiplicativeExpression Remainder unaryExpression;
|
|
|
|
|
//Unary Operators
|
|
|
|
|
unaryExpression: preIncrementExpression
|
|
|
|
|
|preDecrementExpression
|
|
|
|
|
|Addition unaryExpression
|
|
|
|
|
|Subtraction unaryExpression
|
|
|
|
|
|unaryExpressionNotPlusMinus;
|
|
|
|
|
|
|
|
|
|
preIncrementExpression: Increment unaryExpression;
|
|
|
|
|
preDecrementExpression: Decrement unaryExpression;
|
|
|
|
|
unaryExpressionNotPlusMinus: postfixExpression
|
|
|
|
|
|BitwiseComplement unaryExpression
|
|
|
|
|
|LogicalComplement unaryExpression
|
|
|
|
|
| castExpression;
|
|
|
|
|
castExpression: ParenthesesLeft primitiveType ParanthesesRight unaryExpression
|
|
|
|
|
| ParenthesesLeft referenceType ParanthesesRight unaryExpressionNotPlusMinus;
|
|
|
|
|
//Primitive types
|
|
|
|
|
primitiveType: numericType
|
|
|
|
|
| Boolean;
|
|
|
|
|
referenceType: classOrInterfaceType
|
|
|
|
|
| arrayType;
|
|
|
|
|
classOrInterfaceType: classType
|
|
|
|
|
| interfaceType;
|
|
|
|
|
classType: typeName;
|
|
|
|
|
interfaceType: typeName;
|
|
|
|
|
//Determining meaning of Name
|
|
|
|
|
typeName: identifier
|
|
|
|
|
| packageOrTypeName Dot Identifier;
|
|
|
|
|
packageOrTypeName: Identifier
|
|
|
|
|
| packageOrTypeName Dot identifier;
|
|
|
|
|
arrayType: type SquareBracketLeft SquareBracketRight;
|
|
|
|
|
numericType: integralType
|
|
|
|
|
| floatingPointType;
|
|
|
|
|
integralType: Byte | Short | Int | Long | Char;
|
|
|
|
|
floatingPointType: Float | Double;
|
|
|
|
|
//postfix expressions
|
|
|
|
|
//postfixExpression: primary
|
|
|
|
|
// | expressionName
|
|
|
|
|
// | postIncrementExpression
|
|
|
|
|
// | postDecrementExpression;
|
|
|
|
|
postfixBase: primary | expressionName ;
|
|
|
|
|
postfixExpression : postfixBase (Increment | Decrement)* ;
|
|
|
|
|
postIncrementExpression: postfixExpression Increment;
|
|
|
|
|
postDecrementExpression: postfixExpression Decrement;
|
|
|
|
|
|
|
|
|
|
//Equality Operators
|
|
|
|
|
equalityExpression:
|
|
|
|
|
relationalExpression
|
|
|
|
|
|equalityExpression EqualEqual relationalExpression
|
|
|
|
|
|equalityExpression NotEqualTo relationalExpression;
|
|
|
|
|
|
|
|
|
|
//Bitwise and Logical Operators
|
|
|
|
|
andExpression:
|
|
|
|
|
equalityExpression
|
|
|
|
|
|andExpression BitwiseAND andExpression;
|
|
|
|
|
exclusiveOrExpression:
|
|
|
|
|
andExpression
|
|
|
|
|
|exclusiveOrExpression BitwiseXOR andExpression;
|
|
|
|
|
expressionName: Identifier (Dot Identifier)*;
|
|
|
|
|
fieldAccess
|
|
|
|
|
: primary Dot Identifier
|
|
|
|
|
| Super Dot Identifier
|
|
|
|
|
| typeName Dot Super Dot Identifier
|
|
|
|
|
;
|
|
|
|
|
|
|
|
|
|
primaryNoNewArray: literal
|
|
|
|
|
| type Dot Class
|
|
|
|
|
|Void Dot Class
|
|
|
|
|
|This
|
|
|
|
|
|qualifiedIdentifier Dot This
|
|
|
|
|
|ParenthesesLeft expression ParanthesesRight
|
|
|
|
|
|classInstanceCreationExpression
|
|
|
|
|
|fieldAccess
|
|
|
|
|
|methodInvocation
|
|
|
|
|
|arrayAccess;
|
|
|
|
|
|
|
|
|
|
classInstanceCreationExpression: New classOrInterfaceType ParenthesesLeft argumentsOpt ParanthesesRight classBody
|
|
|
|
|
| primary New identifier ParenthesesLeft argumentsOpt ParanthesesRight classBody;
|
|
|
|
|
|
|
|
|
|
methodInvocation: methodName arguments
|
|
|
|
|
| primary Dot Identifier arguments
|
|
|
|
|
| Super Dot Identifier arguments
|
|
|
|
|
| typeName Dot Super Dot Identifier arguments;
|
|
|
|
|
methodName
|
|
|
|
|
: Identifier (Dot Identifier)*;
|
|
|
|
|
|
|
|
|
|
//arguments: ParenthesesLeft argumentList? ParanthesesRight;
|
|
|
|
|
|
|
|
|
|
argumentList: expression (Comma expression)*;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|