[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to change default outcome of shift/reduce conflict?
From: |
Hans Aberg |
Subject: |
Re: How to change default outcome of shift/reduce conflict? |
Date: |
Fri, 18 Jan 2002 00:03:57 +0100 |
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
- Re: How to change default outcome of shift/reduce conflict?, (continued)
- Re: How to change default outcome of shift/reduce conflict?, Scott Raney, 2002/01/16
- Re: How to change default outcome of shift/reduce conflict?, Hans Aberg, 2002/01/17
- Re: How to change default outcome of shift/reduce conflict?, Scott Raney, 2002/01/17
- Re: How to change default outcome of shift/reduce conflict?, Anthony DeRobertis, 2002/01/18
- Re: How to change default outcome of shift/reduce conflict?, Hans Aberg, 2002/01/18
- Re: How to change default outcome of shift/reduce conflict?, Akim Demaille, 2002/01/18
- Re: How to change default outcome of shift/reduce conflict?, Hans Aberg, 2002/01/18
- Message not available
- Re: How to change default outcome of shift/reduce conflict?, Hans Aberg, 2002/01/18
- Message not available
- Re: How to change default outcome of shift/reduce conflict?, Hans Aberg, 2002/01/22
Re: How to change default outcome of shift/reduce conflict?, Hans Aberg, 2002/01/18
Re: How to change default outcome of shift/reduce conflict?,
Hans Aberg <=
Re: How to change default outcome of shift/reduce conflict?, Anthony DeRobertis, 2002/01/18