help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rule cycle and reduce/reduce conflict


From: Florent Teichteil
Subject: Re: rule cycle and reduce/reduce conflict
Date: Tue, 19 Nov 2013 09:50:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Thanks John!
One question though: why do the precedence levels of operators '!' and
'=' defined at the beginning of my grammar don't apply in this case?
Moreover, I thought that ambiguous associativity was more likely to
create shift/reduce conflicts rather than reduce/reduce conflicts,
wasn't it?

Regards,
Florent

Le 19/11/2013 00:17, John Levine a écrit :
>> bool_expr : '!' bool_expr
>>          | num_expr '=' num_expr
>>          | 'b'
>>          ;
>>
>> num_expr : bool_expr
>>         | 'n'
>>         ;
> 
> Yes, this is ambiguous.
> 
> If your input is "!b=n", it can't tell which of these you mean:
> 
> ! ( b = n )
> 
> (!b) = n
> 
> R's,
> John
> 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]