reg debugging shift/reduce and reduce/reduce conflicts
6 Apr 2007 00:03:47 -0400

          From comp.compilers

Related articles
reg debugging shift/reduce and reduce/reduce conflicts (2007-04-06)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 6 Apr 2007 00:03:47 -0400
Organization: Compilers Central
Keywords: question, yacc
Posted-Date: 06 Apr 2007 00:03:47 EDT

Hi Everyone,

  I'm trying to develop a parser for a vCard decoder, i'm using lex and
yacc. And to satisfy few type pf vCards i modifed a grammar and it
resulted in shift/reduce and reduce/reduce conflicts. I used -v option
of yacc to generate a y.output file and I was able to understand only
a bit of the file...

                141: shift/reduce conflict (shift 221, red'n 239) on 10

I understand that the conflict is in 141 state and yacc is in a
confusion on token 10 as to whether shift to 221 state or reduce using
a rule 239...

    this is followed by some grammar rules from Yacc and then followed

    20 shift 239
    200 reduce 239
    67 shift 221

  I do not understand this part at all... Please help me in debugging
these errors...

Thanks in advance!!!

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.