All, I have finally gotten around to trying to do something sensible with my C grammar (see discussion during February). Just to remind you all, %merge was used to disambiguate situations like:
(x) * y; ie, is this a cast of *y to type x, or a multiplication of x by y? In most cases the expression in ( ) is more complicated than a single identifier and in this case there is no ambiguity (the expression is not syntacticly a type). If I knew in advance (that is, before the action associated with a rule was executed) I could set some variable that could be tested in the action to decide whether to handle the common case or whether some kind of semantic ambiguity resolution was needed. Unfortunately the function associated with %merge is called AFTER the actions are executed. Looking at the generated parser it seems that simply swapping around the call to yyresolveAction and yyuserMerge (in yyresolveValue) would achieve what I want (ie, the call to the %merge function to occur first). Does anybody know why the decision was made to have the %merge function called last? This choice seems to be very suboptimal. Being able to specify %merge functions that could be called before and after would probably please everybody :-)
begin:vcard fn:Derek M. Jones n:Jones;Derek M. org:Knowledge Software, Ltd adr:;;;Farnborough;Hants;;England email;internet:[EMAIL PROTECTED] tel;work:(44) 1252 520667 note;quoted-printable:Applications Standards Conformance Testing=0D=0A= x-mozilla-html:FALSE url:http://www.knosof.co.uk version:2.1 end:vcard
_______________________________________________ Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison