On Tue, 13 Jun 2006, David Russinoff wrote: > It would appear that my Bison has a bug, not in the parser generator > itself, but in the generation of the "output" file. The output above is > more suggestive of the observed bahavior than the output that I get. > > The line > > > 3 a: p . [$end] > > is the interesting one. I suppose it's saying that the rule should not > be reduced unless the lookahead token is $end.
It's saying that's the only lookahead for which this reduction makes sense. However, that lookahead is in conflict with the shift, shifts are preferred, and so the reduction is thrown away. Thus, the only possibility for this state is a shift... and only on a lookahead of $end. > I do not understand how Bison derives > this information. Can anyone explain this aspect of the algorithm or > tell me how I can learn about it? The dragon book would be my suggestion. Joel _______________________________________________ [email protected] http://lists.gnu.org/mailman/listinfo/help-bison
