Delete remaining commented out syncs.
These sync calls are truly redundant - when we are in a simple alternative block, we can recover sufficiently with `recoverInline`, and so the syncs do not add anything.
This commit is contained in:
parent
940cbcf19f
commit
797cf08111
|
@ -11,6 +11,7 @@ TestTemplates ::= [
|
|||
"LL2": [],
|
||||
"LL3": [],
|
||||
"LLStar": [],
|
||||
"SingleTokenDeletionBeforeAlt": [],
|
||||
"SingleTokenDeletionBeforePredict": [],
|
||||
"SingleTokenDeletionBeforeLoop": [],
|
||||
"MultiTokenDeletionBeforeLoop": [],
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
TestType() ::= "Parser"
|
||||
|
||||
Options ::= [
|
||||
"Debug": false
|
||||
]
|
||||
|
||||
Grammar ::= [
|
||||
"T": {<grammar("T")>}
|
||||
]
|
||||
|
||||
Input() ::= "ac"
|
||||
|
||||
Rule() ::= "a"
|
||||
|
||||
Output() ::= <<
|
||||
>>
|
||||
|
||||
Errors() ::= <<
|
||||
line 1:0 extraneous input 'a' expecting {'b', 'c'}
|
||||
>>
|
||||
|
||||
grammar(grammarName) ::= <<
|
||||
grammar <grammarName>;
|
||||
a : ('b' | 'c')
|
||||
;
|
||||
q : 'a'
|
||||
;
|
||||
>>
|
|
@ -469,7 +469,6 @@ CodeBlockForAlt(currentAltCodeBlock, locals, preamble, ops) ::= <<
|
|||
|
||||
LL1AltBlock(choice, preamble, alts, error) ::= <<
|
||||
setState(<choice.stateNumber>);
|
||||
<!_errHandler.sync(this);!>
|
||||
<if(choice.label)><labelref(choice.label)> = _input.LT(1);<endif>
|
||||
<preamble; separator="\n">
|
||||
switch (_input.LA(1)) {
|
||||
|
@ -483,7 +482,6 @@ default:
|
|||
|
||||
LL1OptionalBlock(choice, alts, error) ::= <<
|
||||
setState(<choice.stateNumber>);
|
||||
<!_errHandler.sync(this);!>
|
||||
switch (_input.LA(1)) {
|
||||
<choice.altLook,alts:{look,alt| <cases(ttypes=look)>
|
||||
<alt>
|
||||
|
@ -495,7 +493,6 @@ default:
|
|||
|
||||
LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
|
||||
setState(<choice.stateNumber>);
|
||||
<!_errHandler.sync(this);!>
|
||||
<preamble; separator="\n">
|
||||
if (<expr>) {
|
||||
<alts; separator="\n">
|
||||
|
|
Loading…
Reference in New Issue