help-bison
[Top][All Lists]
Advanced

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

Re: y.output format


From: Tim Van Holder
Subject: Re: y.output format
Date: Thu, 10 Jan 2002 21:14:27 +0100

> I am afraid however I get a shift/reduce conflict which I do not
understand.
>
> Where can I find a simple tutorial which explains the y.output file
format ?

Not sure about where there's a tutorial, but these steps should help:

1) look at the top portion of the .output file.  It should have a list
of
   all the states that have S/R conflicts
2) search the file for 'state XX' where XX is the number of a state that
   has a conflict.
   This should help you track down the state that has a problem.
3) The state's entry should make clear what bison is trying to do at
that
   point:

      foo . bar
      xyzzy . bar

   This means that bison in this state when it has just accepted either
the
   'foo' or the 'bar' token/rule, and is about to look for a 'bar'
token/rule.
   It also lists the tokens it can accept, and what it does if it finds
them.
   The reduces that cause a conflict with a shift should be listed in
angle
   brackets.  This should be enough to point to the actual problem.
   It takes a bit of practice, but you'll soon learn to quickly deduce
the
   problem from the information in the .output file.

Hope this helps.

Oh, and please don't post in HTML.  Thanks.




reply via email to

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