summaryrefslogtreecommitdiffstats
path: root/intl/gettextP.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-03-19 17:43:35 +0000
committerBruno Haible <bruno@clisp.org>2001-03-19 17:43:35 +0000
commit36d52088b78bc3a741b59f57d8b04d71178da666 (patch)
treecbdcb6eb7ef5a7e77b21bd71a291942939eb340f /intl/gettextP.h
parent18921c028a40f6d5c2e2db6bb020e84d5908716f (diff)
downloadexternal_gettext-36d52088b78bc3a741b59f57d8b04d71178da666.zip
external_gettext-36d52088b78bc3a741b59f57d8b04d71178da666.tar.gz
external_gettext-36d52088b78bc3a741b59f57d8b04d71178da666.tar.bz2
Rework the last plural.y changes, for clarity, and optimize for space.
Diffstat (limited to 'intl/gettextP.h')
-rw-r--r--intl/gettextP.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/intl/gettextP.h b/intl/gettextP.h
index 715b04d..c7f4655 100644
--- a/intl/gettextP.h
+++ b/intl/gettextP.h
@@ -75,11 +75,15 @@ SWAP (i)
plural form. */
struct expression
{
+ int nargs; /* Number of arguments. */
enum operator
{
+ /* Without arguments: */
var, /* The variable "n". */
num, /* Decimal number. */
+ /* Unary operators: */
lnot, /* Logical NOT. */
+ /* Binary operators: */
mult, /* Multiplication. */
divide, /* Division. */
module, /* Module operation. */
@@ -89,30 +93,17 @@ struct expression
greater_than, /* Comparison. */
less_or_equal, /* Comparison. */
greater_or_equal, /* Comparison. */
- equal, /* Comparison for equality. */
- not_equal, /* Comparison for inequality. */
+ equal, /* Comparision for equality. */
+ not_equal, /* Comparision for inequality. */
land, /* Logical AND. */
lor, /* Logical OR. */
+ /* Ternary operators: */
qmop /* Question mark operator. */
} operation;
union
{
unsigned long int num; /* Number value for `num'. */
- struct
- {
- struct expression *right; /* Subexpression in unary operation. */
- } args1;
- struct
- {
- struct expression *left; /* Left expression in binary operation. */
- struct expression *right; /* Right expression in binary operation. */
- } args2;
- struct
- {
- struct expression *bexp; /* Boolean expression in ?: operation. */
- struct expression *tbranch; /* True-branch in ?: operation. */
- struct expression *fbranch; /* False-branch in ?: operation. */
- } args3;
+ struct expression *args[3]; /* Up to three arguments. */
} val;
};