update final

This commit is contained in:
Mann Patel
2025-09-28 00:06:11 -06:00
parent 586db088b4
commit 9ceac201a3
7 changed files with 3 additions and 276 deletions

View File

@@ -1,15 +1,11 @@
lexer grammar ExprLexer;
// LINE TERMINATORS -----------------------------------------------------------------------------------------------------------------------
fragment LineTerminator: '\r' '\n'? | '\n';
//WHITE SPACE ----------------------------------------------------------------------------------------------------------------------------------------
WhiteSpace: (' ' | '\t' | '\f' | LineTerminator) -> skip;
//COMMENTS --------------------------------------------------------------------------------------------------------------------------------------------------
fragment EndOfLineComment: '//' ~('\r' | '\n')* LineTerminator?;
Comment: (TraditionalComment | EndOfLineComment) -> skip;
fragment TraditionalComment:
@@ -26,7 +22,6 @@ fragment NotStar:
fragment NotStarNotSlash:
[^*/] | LineTerminator;
// KEYWORDS --------------------------------------------------------------------------------------------------------
Abstract: 'abstract';
Assert: 'assert';
Boolean: 'boolean';
@@ -78,7 +73,7 @@ Volatile: 'volatile';
While: 'while';
Dot: '.';
// LITERALS -------------------------------------------------------------------------------------------------------------------
IntegerLiteral: DecimalIntegerLiteral | HexIntegerLiteral | OctalIntegerLiteral;
fragment DecimalIntegerLiteral:
@@ -169,7 +164,6 @@ BooleanLiteral: 'true' | 'false' ;
NullLiteral: 'null';
//SEPRATORS -------------------------------------------------------------------------------------------------------------------------
ParenthesesLeft: '(';
ParenthesesRight: ')';
CurlyBracketLeft: '{';
@@ -179,8 +173,6 @@ SquareBracketRight: ']';
Semicolon: ';';
Comma: ',';
//OPERATORS ---------------------------------------------------------------------------------------------------------------------------------------
UnsignedRightShiftAssign: '>>>=';
EqualTo: '==';
NotEqualTo: '!=';
@@ -219,9 +211,6 @@ BitwiseOR: '|';
BitwiseXOR: '^';
Remainder: '%';
//IDENTIFIERS -------------------------------------------------------------------------------------------------------------------------------------------
IDENTIFIER: JavaLetter JavaLetterOrDigit*;
fragment JavaLetter:
[a-zA-Z$_];