On the grammar of a .y (yacc -- bison) file I've defined the following rules:
C : E | D | F | A
A : B | B '[' C ']' ;
(this is something like B with optional [C]) when I compile the .y file in the appropriate way using a proper lexer file I get the following shift\reduce conflict:
State 48
74 A: B .
75 | B . '[' C ']'
'[' shift, and go to state 91
'[' [reduce using rule 74 (A)]
$default reduce using rule 74 (A)
My problem is the following if it has predecessor '[' I want it to shift and not reduce. The problem is I cannot find the solution to this error, while searching for hours on the documentation. How can I fix this (please be code-specific).