Conflicts
. The general shift-reduce technique is:
- if there is no handle on the stack then shift
- If there is a handle then reduce
. However, what happens when there is a choice
- What action to take in case both shift and reduce are valid?
shift-reduce conflict
- Which rule to use for reduction if reduction is possible by more than one rule?
reduce-reduce conflict
. Conflicts come either because of ambiguous grammars or parsing method is not powerful enough