At 13:56 -0700 2002/01/16, Scott Raney wrote:
>Hey, and that's an easy one.  Wait until you get to "the number of
>card", at which point the next token could be "button", at which point
>"number" is a property, or "buttons", at which point it's a function.

This sounds like a grammar like:

%token BUTTON, NUMBER

%%

numbered_buttons:
    NUMBER BUTTON
  | NUMBER buttons

buttons:
    BUTTON BUTTON
  | buttons BUTTON

%%

This is unambiguos in Bison, and admits different actions if one resp.
several buttons are used. (Or replace BUTTON with a suitable nonterminal.)

  Hans Aberg



_______________________________________________
Freecard-general mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freecard-general

Reply via email to