forked from jasder/antlr
Make sample grammar for modes more readable
add a new line to the grammar used as an example for the mode changing operators to make the example more accessible
This commit is contained in:
parent
a4c66dc863
commit
6615eafeb8
|
@ -244,7 +244,8 @@ The mode commands alter the mode stack and hence the mode of the lexer. The 'mor
|
|||
```
|
||||
// Default "mode": Everything OUTSIDE of a tag
|
||||
COMMENT : '<!--' .*? '-->' ;
|
||||
CDATA : '<![CDATA[' .*? ']]>' ;OPEN : '<' -> pushMode(INSIDE) ;
|
||||
CDATA : '<![CDATA[' .*? ']]>' ;
|
||||
OPEN : '<' -> pushMode(INSIDE) ;
|
||||
...
|
||||
XMLDeclOpen : '<?xml' S -> pushMode(INSIDE) ;
|
||||
SPECIAL_OPEN: '<?' Name -> more, pushMode(PROC_INSTR) ;
|
||||
|
|
Loading…
Reference in New Issue