help-bison
[Top][All Lists]
Advanced

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

I cant resolve my reduce/reduce comflicts


From: Guenther Sohler
Subject: I cant resolve my reduce/reduce comflicts
Date: Fri, 13 Aug 2021 13:13:17 +0200

Hi group,

I got another issue with bison regarding resolving my conflicts.
right now i have 50 conflicts and
I can't appear to resolve them even though i have carefully read
the chapter at
https://www.oreilly.com/library/view/flex-bison/9780596805418/ch07.html
which actually explains conflicts and the outputfile very well, i like it!

I believe thes conflict arise because in my case because in my grammar
have these rules:


expression:
'(' expression ')
| lvalue

lvalue:
'(' lvalue ')'

So there are two ways to turn '(' lvalue' ')' into expression
and i feel i need both of them.
the conflict can be waived in my opinion, because both codes do the same
"nothing" .
The Braces are jsut to define precedence in C code and still i want to
resolve the issue.

Can you please look into my files and give me some hints on how to do it
better ?
Also the operator precedence is not correct most likely ...


Thank you and best regards

Attachment: file.yacc
Description: Binary data

Attachment: parser_yacc_yacc.output
Description: Binary data


reply via email to

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