X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/34136e65fc7bd6babcfedcbfcfdca3b9feb10f1d..dd31e17d7e415d3be8fc603f752f7e975297bcc2:/src/parse-gram.y diff --git a/src/parse-gram.y b/src/parse-gram.y index 19c2f5b0..532349bb 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -608,7 +608,7 @@ rhs: { grammar_current_rule_symbol_append ($2, @2, $3); } | rhs "{...}" named_ref.opt { grammar_current_rule_action_append ($2, @2, $3, false); } -| rhs "%?{...}" +| rhs "%?{...}" { grammar_current_rule_action_append ($2, @2, NULL, true); } | rhs "%prec" symbol { grammar_current_rule_prec_set ($3, @3); } @@ -729,7 +729,7 @@ lloc_default (YYLTYPE const *rhs, int n) loc.start = rhs[n].end; loc.end = rhs[n].end; - /* Ignore empty nonterminals the start of the the right-hand side. + /* Ignore empty nonterminals the start of the right-hand side. Do not bother to ignore them at the end of the right-hand side, since empty nonterminals have the same end as their predecessors. */ for (i = 1; i <= n; i++) @@ -804,7 +804,7 @@ version_check (location const *loc, char const *version) { complain_at (*loc, "require bison %s, but have %s", version, PACKAGE_VERSION); - exit (63); + exit (EX_MISMATCH); } }