>>> "Joel" == Joel E Denny <[EMAIL PROTECTED]> writes:
> I think %merge ought to be like %destructor, %printer,
> %initial-action, and Akim's proposed %error-report (to replace
> yyerror):
Agreed. There are more functions on this list, including
location_default, and, after all why not, yylex (I mean the
invocation). BTW we don't need to make them all function, the
interface makes it easy for us to inline them if needed.
> %merger { $$ = new_lhs ($1, $2); } [RULE_A] [RULE_B];
> lhs:
> [RULE_A] rhs1 rhs2 { $$ = new_lhs ($1, $2); }
> [RULE_B] rhs1 rhs2 rhs3 { $$ = new_lhs ($1, $2, $3); }
> ;
I agree naming is nice, but let's keep our set of lexical construct
simple.
lhs:
rhs1 rhs2 %rule L1 { $$ = new_lhs ($1, $2); }
| rhs1 rhs2 rhs3 %rule L2 { $$ = new_lhs ($1, $2, $3); }