blob: ccb798a80456ee7ca7601dbfa6b21d5e05fa9753 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
//
// DO NOT MODIFY THIS FILE.
//
// This file describes the tokens that will be available to the parser
// that uses the grammar described in Expr.cfg.
lexer grammar ExprLexer;
PLUS: '+' ;
MINUS: '-' ;
MULTIPLY: '*' ;
DIVIDE: '/' ;
OPAREN: '(' ;
CPAREN: ')' ;
FLOAT
: DIGIT+ '.' DIGIT+
;
INT
: DIGIT+
;
IDENTIFIER
: LETTER (LETTER | DIGIT)*
;
COMMENT
: ( '//' ~[\r\n]* '\r'? '\n'
| '/*' .*? '*/'
) -> skip
;
WS
: (' ' | '\t' | '\n' | '\r' | '\f')+ -> skip
;
fragment LETTER : ('a'..'z' | 'A'..'Z');
fragment DIGIT : ('0'..'9');
|