antlr/tool/playground/U.g

13 lines
312 B
Plaintext
Raw Normal View History

2012-07-25 05:19:43 +08:00
lexer grammar U;
2012-07-25 05:19:43 +08:00
X : 'a' -> skip ;
Y : 'z' -> skip, more ;
// (RULE C (BLOCK (LEXER_ALT_ACTION (ALT 'x') (LEXER_ACTION_CALL mode ISLAND))))
C: 'x' -> mode(ISLAND) ;
// (RULE A (BLOCK (LEXER_ALT_ACTION (ALT 'a') (LEXER_ACTION_CALL mode ISLAND) skip)))
A: 'b' -> mode(ISLAND), skip ;
2012-07-25 05:19:43 +08:00
mode INSIDE;
2012-07-25 05:19:43 +08:00
B : '<' ;