 The lookahead can help avoid reducing a specific rule if the lookahead is not valid, which would probably mean that the current state should be combined with the following instead of the previous state.That means in the following example


the state sequence can be reduced to

instead of

if the lookahead after the parser went to state B wasn't acceptable, i.e.no transition rule existed.