Skip to content

Commit

Permalink
updated the example grammar for zaach#348 to mirror the latest state …
Browse files Browse the repository at this point in the history
…of affairs, where the default grammar production value assignment code `$$ = $1` (default-action-mode=classic) is injected also when there actually **is** an action block present, **IFF** said action block does not assign a value to `$$` itself.
  • Loading branch information
GerHobbelt committed Sep 11, 2017
1 parent 0aa41d5 commit 2f90353
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/issue-348.jison
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ end mc
var rv = parser.parse(input);
console.log("test #1: ==> ", rv);
assert.equal(rv, true, "test returns TRUE because the start rule has an action block, so no default action inserted and $$ has been set to UNDEFINED then");
assert.equal(rv, "define", "test returns TRUE because the start rule has an action block, so no default action inserted and $$ has been set to $1 === 'DEFINE' then");
// if you get past the assert(), you're good.
console.log("tested OK");
Expand Down

0 comments on commit 2f90353

Please sign in to comment.