update final
This commit is contained in:
13
ExprLexer.g4
13
ExprLexer.g4
@@ -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$_];
|
||||
|
||||
Reference in New Issue
Block a user