forked from jasder/antlr
Merge pull request #2800 from Agrabski/patch-1
Make sample grammar for lexer modes more readable
This commit is contained in:
commit
bbf042619e
|
@ -249,6 +249,7 @@ YYYY/MM/DD, github id, Full name, email
|
|||
2020/02/21, StochasticTinkr, Daniel Pitts, github@coloraura.com
|
||||
2020/03/17, XsongyangX, Song Yang, songyang1218@gmail.com
|
||||
2020/04/07, deniskyashif, Denis Kyashif, denis.kyashif@gmail.com
|
||||
2020/04/10, agrabski, Adam Grabski, adam.gr@outlook.com
|
||||
2020/04/23, martinvw, Martin van Wingerden, martin@martinvw.nl
|
||||
2020/04/30, TristonianJones, Tristan Swadell, tswadell@google.com
|
||||
2020/05/06, iammosespaulr, Moses Paul R, iammosespaulr@gmail.com
|
||||
|
|
|
@ -246,7 +246,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