help-bison
[Top][All Lists]
Advanced

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

shift/reduce conflict with unary


From: cwcaceres
Subject: shift/reduce conflict with unary
Date: Tue, 21 Aug 2007 02:03:34 -0700 (PDT)

Hi, I'm having shift/reduce conflict with the unary expression in my grammar
file. I've tried using the %prec modifier but it doesn't seem to work. 

%token NUMBER 
%token BIT_NOT NOT
%left PLUS MINUS OR XOR
%left UPLUS
%%

expression_list
                : /* empty */
                | expression_list summation_expression
                ;

summation_expression
                :unary_expression
                | summation_expression PLUS unary_expression 
                | summation_expression MINUS unary_expression
                | summation_expression OR unary_expression
                | summation_expression XOR unary_expression
                ;

unary_expression
                : NUMBER
                | PLUS NUMBER %prec UPLUS 
                | BIT_NOT NUMBER
                | NOT NUMBER
                ;

I hope someone can help me with this. Thanks.
-- 
View this message in context: 
http://www.nabble.com/shift-reduce-conflict-with-unary-tf4303942.html#a12250917
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.





reply via email to

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