cleanup parser for only required rules

This commit is contained in:
Nicolas Amaya
2025-09-27 15:47:51 -06:00
parent 9e858a98f3
commit eccf1fa914
7 changed files with 41 additions and 1726 deletions

View File

@@ -1,44 +0,0 @@
parser grammar syntactic;
options {
tokenVocab=ExprLexer;
}
identifier: IDENTIFIER;
qualifiedIdentifier: identifier {'.' identifier};
literal: IntegerLiteral
| FloatingPointLiteral
| CharacterLiteral
| StringLiteral
| BooleanLiteral
| NullLiteral;
expression: expression1 [assignmentOperator expression1];
assignmentOperator: Assignment
| AddAssign
| SubtractAssign
| MultiplyAssign
| DivideAssign
| BitwiseANDAssign
| BitwiseORAssign
| BitwiseXORAssign
| RemainderAssign
| LeftShiftAssign
| SighnedRightShiftAssign
| UnsighnedRightShiftAssign;
type: identifier {'.' identifier} bracketsOpt
| basicType;
statementExpression: expression;
constantExpression: expression;
expression1: expression2 [expression1Rest];
expression1Rest: ['?' expression ':' expression1];
expression2: expression3 [expression2Rest];