|
From: | cwcaceres |
Subject: | Re: shift/reduce conflict with unary |
Date: | Wed, 22 Aug 2007 01:02:18 -0700 (PDT) |
Derek M Jones wrote: > > Don't forget that your parser has to operate with a single token of > look-ahead. You think it is similar because you are taking a global > view (the two grammars do specify very similar token sequences). > > Try to think in terms of a push down automata that has to decide what > to do given its current state and the next token. In the case of > the C++ grammar there are no shift/reduce decision conflicts (I'm > assuming you copied it correctly). > Thanks. I understand what you're saying about the look-ahead token and how the parser always just chooses between shifting and reducing. I've also looked at the output file. However I still don't know how to fix it so that there'd be no conflict. I'll probably try looking at more examples. -- View this message in context: http://www.nabble.com/shift-reduce-conflict-with-unary-tf4303942.html#a12269989 Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.
[Prev in Thread] | Current Thread | [Next in Thread] |