]> git.ipfire.org Git - thirdparty/gettext.git/commit
intl: Fix grammar conflicts instead of accepting them.
authorAkim Demaille <akim.demaille@gmail.com>
Fri, 1 May 2020 10:40:42 +0000 (12:40 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 1 May 2020 19:39:51 +0000 (21:39 +0200)
commit34c426889e1c426d6f0b7063e325dfc706d3eb8d
treed23cd86349494f3799cb5fcfdbccf226d6bfc984
parent42c37e2889fb0cf7b8dbe033dcb573b3ef62f697
intl: Fix grammar conflicts instead of accepting them.

The seven conflicts are related to "a ? b : c <op> d".  In all the
cases we left the S/R conflict be resolved as a shift, i.e., "a ? b
: (c <op> d)".  To make this explicit, give the rule of the ternary
operator a very low precedence.  In fact give it the same precedence
as "?".  Now, to resolve the conflict in "a ? b : c ? d : e" be parsed
as "a ? b : (c ? d : e)", make them right-associative.

* gettext-runtime/intl/plural.y: Require Bison 3.0, to use %precedence
instead of useless associativities such as %right.
Make '?' and ':' of the same precedence, right associative.
gettext-runtime/intl/plural.y