You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
321 B
29 lines
321 B
7 months ago
|
// Lexer grammar using synpreds
|
||
|
lexer grammar t051lexer;
|
||
|
|
||
|
options {
|
||
|
language=Cpp;
|
||
|
}
|
||
|
|
||
|
@lexer::includes
|
||
|
{
|
||
|
#include "UserTestTraits.hpp"
|
||
|
}
|
||
|
@lexer::namespace
|
||
|
{ Antlr3Test }
|
||
|
|
||
|
fragment
|
||
|
POINT
|
||
|
: '.'
|
||
|
;
|
||
|
NUMBER
|
||
|
: ( ( NUM POINT NUM ) => NUM POINT NUM
|
||
|
| POINT NUM
|
||
|
| NUM
|
||
|
)
|
||
|
;
|
||
|
fragment
|
||
|
NUM
|
||
|
: '0' .. '9' ( '0' .. '9' )*
|
||
|
;
|