help-bison
[Top][All Lists]
Advanced

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

Newbie: how to get rid of this r/r conflict


From: sreeraj r
Subject: Newbie: how to get rid of this r/r conflict
Date: Fri, 19 Jun 2009 15:42:26 +0530 (IST)

Hi all,

      I have a rule as following (:ab|ba|a|b)
           
      : K_timeunit TIME_LITERAL';'
        K_timeprecision TIME_LITERAL';' 
        < >
      | K_timeprecision TIME_LITERAL';'
        K_timeunit TIME_LITERAL';'
        < >

      | K_timeprecision TIME_LITERAL';'
        < >

      | K_timeunit TIME_LITERAL';'
        < >
       ;

I really dont want to write one recursive rule as this is the only possible 
combination . As per my understanding the r/r conflict can be removed by giving 
"ab" and "ba" precedence over "a" and "b". 

Could anyone please check this and tell how to get rid of this. Or is there 
anything terribly wrong with my grammar(n00b).

.output is giving the following r/r conflict

   78 timeunits_declaration: K_timeprecision TIME_LITERAL ';' . @1 K_timeunit 
TIME_LITERAL ';'
   82                      | K_timeprecision TIME_LITERAL ';' .

    K_timeunit  reduce using rule 77 (@1)
    K_timeunit  [reduce using rule 82 (timeunits_declaration)]
    $default    reduce using rule 82 (timeunits_declaration)

    @1  go to state 95

regards
Sreeraj


      Love Cricket? Check out live scores, photos, video highlights and more. 
Click here http://cricket.yahoo.com


reply via email to

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