I specified operator precedence and association, but there are still reduce/reduce conflicts error message....

2009-05-12 Thread Yinpeng Li
%left OR %left AND %% predicate:predicate OR predicate{ $$ = new AST_PredicateTreeNode($1, $3, AST_PredicateTreeNode::OR) ; REGISTER_AST_NODE($$) ; }

Token precedence only applies to tokens immediately before and after the parsing dot

2009-05-12 Thread Hans Aberg
On 12 May 2009, at 09:06, Yinpeng Li wrote: %left OR %left AND %% predicate:predicate OR predicate{ $$ = new AST_PredicateTreeNode($1, $3, AST_PredicateTreeNode::OR) ;

Re: How to negate a non-terminal ?

2009-05-12 Thread Hans Aberg
On 3 May 2009, at 15:46, Samkit Jain wrote: Now my question is that, is there any way by which I can negate nt_2 while creating nt_5 ? I guess that, as it is not a commonly needed feature, you will need to do it by hand. You might also inquire in the Usenet newsgroup comp.compilers about

Re: Token precedence only applies to tokens immediately before and after the parsing dot

2009-05-12 Thread Yinpeng Li
Sorry, I am a rookie here...Could you explain more thoroughly? On Tue, May 12, 2009 at 4:32 PM, Hans Aberg wrote: > On 12 May 2009, at 09:06, Yinpeng Li wrote: > > %left OR >> %left AND >> >> %% >> >> predicate:predicate OR predicate

Re: I specified operator precedence and association, but there are still reduce/reduce conflicts error message....

2009-05-12 Thread Akim Demaille
Le 12 mai 09 à 09:06, Yinpeng Li a écrit : THE ERROR REPORT: state 54 17 predicate: predicate . OR predicate [END_OF_COMMAND, RIGHT_PARENTHESIS, OR] 17 | predicate OR predicate . [END_OF_COMMAND, RIGHT_PARENTHESIS, OR] 18 | predicate . AND predicate AND shift, an

Re: I specified operator precedence and association, but there are still reduce/reduce conflicts error message....

2009-05-12 Thread Yinpeng Li
OK.Thanks again. On Tue, May 12, 2009 at 8:27 PM, Akim Demaille wrote: > > Le 12 mai 09 à 13:49, Yinpeng Li a écrit : > > Oh I see.THanks a lot >> >> But how can I eliminate this error message? >> > > But simply stopping calling informational messages as "error messages". > Unless you

Re: Token precedence only applies to tokens immediately before and after the parsing dot

2009-05-12 Thread Hans Aberg
On 12 May 2009, at 12:33, Yinpeng Li wrote: Sorry, I am a rookie here...Could you explain more thoroughly? It was hard to interpret from your message - Akim explained. But token precedences can only at best solve shift/reduce conflicts, not reduce/ reduce, and only those where there are to

Re: Token precedence only applies to tokens immediately before and after the parsing dot

2009-05-12 Thread Yinpeng Li
OK...Thanks anyway. Yinpeng On Tue, May 12, 2009 at 9:27 PM, Hans Aberg wrote: > > On 12 May 2009, at 12:33, Yinpeng Li wrote: > > Sorry, I am a rookie here...Could you explain more thoroughly? >> > > It was hard to interpret from your message - Akim explained. But token > precedences can only