I cant resolve my reduce/reduce comflicts
Guenther Sohler <[email protected]> Fri, 13 Aug 2021 13:13:17 +0200
| Newsgroups | gmane.comp.parsers.bison.general |
|---|---|
| Message-ID | <CAASeUHoPqroDG73R1VuyYXocw9AF-gBWvUnnxZ8ovkSiPQaDqw@mail.gmail.com> |
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
file.yacc
(application/octet-stream, 6 KB) - not displayed
parser_yacc_yacc.output
(application/octet-stream, 334.5 KB) - not displayed