yacc and bison turn your grammar into a state machine. You must be able to randomly move around the state machine to find valid inputs.
In principle, in each state, you can either transfer a new token to the stack, or switch to a new state, or reduce the upper token in the stack based on a set of valid abbreviations. (For more on how this works, see the Bison manual .
, , . , .
-v --report=state .
, - , .