help-bison
[Top][All Lists]
Advanced

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

shift/reduce problem


From: Fiordean Dacian
Subject: shift/reduce problem
Date: Tue, 25 Jun 2002 17:28:58 +0200

 
Hi all,
 
I do have a problem with a shift/reduce on the following grammar:
 
...
 
single_loop_expr
    : single_loop_expr_head inline_expr_body loop_expr_end
    ;
 
single_loop_expr_head
    : KW_LOOP possible_loop_boundary KW_BEGIN        
                possible_inline_expr_identification end
    ;
 
inline_expr_body
    : instance_event_list
    ;
 
loop_expr_end
    : KW_LOOP KW_END end
    ;
 
possible_loop_boundary
                    : /* something here */
                    ;
 
possible_inline_expr_identification
                    : /* somtehing here */
                    ;
 
instance_event_list
     : instance_event
     | instance_event_list instance_event 
     ;
instance_event
    : orderable_event
    | non_orderable_event
    ;
 
orderable_event
                    : /* something here */
                    ;
 
non_ordorable_event
                    : /* something here */
                    ;
 
 
This generates 5 shift/reduce conflicts (maybe plus other productions which there are there), but my big problem is that the loop_expr_end is never reduced, for a correct input, in my opinion.
 
So, anybody has an idea on how I could rewrite (if that's the issue) this for the parsing process to work?
 
 
Thx,
 
D.
 


 


reply via email to

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