Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 04fdb19ae912392f3876b2868b898af29846fcfa (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
class GameLexer extends Lexer;

options
{
	testLiterals=false;
	k=3;
	charVocabulary='\003'..'\377';
}

SEMI    : ';';

ID options { testLiterals=true; }
: ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | DIGIT)* ;

INT_LITERAL : (DIGIT)+ ;

protected DIGIT : '0'..'9';

WS : (' ' | '\t' | '\f' | '\r' | '\n')+ 
{ $setType(Token.SKIP); }
;

SINGLE_LINE_COMMENT : "//" (~('\n'|'\r'))* ('\n'|'\r')?
{ $setType(Token.SKIP); }
;

Back to the top