On 8 Jan 2011, at 22:37, Paul Eggert wrote:
Yes, Bison experts can parse the code because they know all
the ins and outs of the rules. But surely ordinary users will
be confused. For example, if "--x" is an identifier, then
in C code
$--x
is supposed to be parsed as "$" applied to the identifier "--x", but
*--x
is supposed to be parsed as "*" applied to "--" applied to
the identifier "x".
This is the sort of confusion I am worried about.
In a parser I am writing on top of guile, I have very restricted
identifiers, but in order to allow any passed down to guile, one can
use quotes '...'. This avoids any confusion. In infix notation, x-y
could be interpreted as the expression x - y, but 'x-y' is easy to see
as an identifier.
I gather you are discussing putting labels on the rule items. Is that
available in the current distribution?