forked from jasder/antlr
wasn't walking lexer rule trees right.
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9874]
This commit is contained in:
parent
ec5e3e51b1
commit
b90d41b508
|
@ -357,9 +357,42 @@ outerAlternative
|
|||
;
|
||||
|
||||
lexerAlternative
|
||||
: alternative
|
||||
: ^(LEXER_ALT_ACTION lexerElements lexerAction+)
|
||||
| lexerElements
|
||||
;
|
||||
|
||||
lexerElements
|
||||
: ^(ALT lexerElement+)
|
||||
;
|
||||
|
||||
lexerElement
|
||||
: element
|
||||
;
|
||||
|
||||
labeledLexerElement
|
||||
: ^((ASSIGN|PLUS_ASSIGN) ID (lexerAtom|block))
|
||||
;
|
||||
|
||||
lexerBlock
|
||||
: ^(BLOCK lexerAlternative+)
|
||||
;
|
||||
|
||||
lexerAtom
|
||||
: terminal
|
||||
| ^(NOT blockSet)
|
||||
| blockSet
|
||||
| ^(WILDCARD elementOptions)
|
||||
| WILDCARD
|
||||
| ARG_ACTION
|
||||
;
|
||||
|
||||
actionElement
|
||||
: ACTION
|
||||
| ^(ACTION elementOptions)
|
||||
| SEMPRED
|
||||
| ^(SEMPRED elementOptions)
|
||||
;
|
||||
|
||||
alternative
|
||||
@init {
|
||||
discoverAlt((AltAST)$start);
|
||||
|
|
Loading…
Reference in New Issue