Machine-translated by Google. Questions are authored in English.
Top

Discussion

A reduce-reduce conflict usually indicates

  • A.a construct that the default resolution rule handles correctly
  • B.that the grammar requires an extra token of lookahead only
  • C.a mistake made while the lookahead sets were being worked out
  • D.a genuine problem in the grammar that needs restructuring

Answer: D

Correct answer: a genuine problem in the grammar that needs restructuring

A shift-reduce conflict often reflects a real ambiguity with a conventional resolution - the dangling else being the standard case - and shifting handles it correctly. A reduce-reduce conflict means the parser cannot tell which of two constructs it has just seen, which almost always indicates the grammar itself is at fault.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.