Skip to content

Commit

Permalink
Fix code generation for LL1OptionalBlock bypass alternative
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Dec 23, 2016
1 parent 3361365 commit 7a83cd4
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ switch (TokenStream.LA(1)) {
<alt>
break;}; separator="\n">
default:
<error>
break;
}
>>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ switch (_input->LA(1)) {
\}
}; separator="\n">
default:
<error>
break;
}
>>

Expand Down
3 changes: 0 additions & 3 deletions tool/resources/org/antlr/v4/tool/templates/codegen/Go/Go.stg
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,6 @@ switch p.GetTokenStream().LA(1) {

<endif>
default:
<if(error)>
<error>
<endif>
}
>>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ switch (_input.LA(1)) {
<alt>
break;}; separator="\n">
default:
<error>
break;
}
>>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ switch (this._input.LA(1)) {
<alt>
break;}; separator="\n">
default:
<error>
break;
}
>>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ token = self._input.LA(1)
<alt>
pass}; separator="\nel">
else:
<error>
pass
>>

LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ token = self._input.LA(1)
<alt>
pass}; separator="\nel">
else:
<error>
pass
>>

LL1OptionalBlockSingleAlt(choice, expr, alts, preamble, error, followExpr) ::= <<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ switch (<parser.name>.Tokens(rawValue: try _input.LA(1))!) {
<alt>
break}; separator="\n">
default:
<error>
break
}
>>

Expand Down

0 comments on commit 7a83cd4

Please sign in to comment.