pichi20 0 Newbie Poster

Hi,

I'm only starting my program and I already have this error but I really don't understand which ones are causing this shift/reduce conflict and why. Can please someone help me? it says I have 2 conflict shif/reduce. This is the grammar:

Start   : Declarations/* put your RHS for this rule here */
        {
        }

        ; /* note that the rule ends with a semicolon */

epsilon:
       ;

Declarations :VarDeclaration2 FunDeclaration FunDeclaration2
             {
             }
             ;

VarDeclaration2 :VarDeclaration  {}
                |epsilon
                ;

FunDeclaration2 :FunDeclaration {}
                |epsilon
                ;

VarDeclaration :TypeSpecifier IDENTIFIER
               {
               }
               ;

FunDeclaration :TypeSpecifier IDENTIFIER | TypeSpecifier IDENTIFIER "[""]"
               {}
               ;

TypeSpecifier :int {}
              |void
              ;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.