OK
> 2. term: length | STRING | HEXCOLOR | NUMBER | IDENT | attref | propref |
> ENVVAR | '(' value ')';
>
> Here propref conflicts with IDENT. Change to:
>
> term: length | STRING | HEXCOLOR | NUMBER | IDENT | attref |
> ENVVAR | '(' value ')';
OK. (Actually, we need another terminal in there, PERCENTAGE, because
we decided to treat a percentage as a type of its own, instead of as a
number.)
> 3. op: '+' | '-' | '*' | '/' | INTERPOLATEHI | INTERPOLATELO | /* empty */;
>
> Produces 2 shift/reduce conflicts. Change to:
>
> op: '+' | '-' | '*' | '/' | INTERPOLATEHI | INTERPOLATELO;
As you already noted in your other message, this conflict is
unavoidable, since we want the absence of an operator to mean
concatenation (or rather, list construction). Just put "%expect 2" at
the top of the yacc/bison file. Yacc wil shift rather than reduce,
which is what you want in this case.
Like with the (f)lex specification, we have a correct, tested grammar,
but it failed to make it into the 4th draft. We'll include it as soon
as possible.
We changed some of the names of the nonterminals as well, to bring
them more into line with the terminology used elsewhere in the draft.
Bert