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

Discussion

The chief practical disadvantage of LR parsing is that

  • A.the method requires exponential time on some inputs
  • B.no tool exists that can generate an LR parser automatically
  • C.the tables are opaque and conflicts can be hard to diagnose
  • D.the parser cannot handle recursive constructs of any kind

Answer: C

Correct answer: the tables are opaque and conflicts can be hard to diagnose

LR parsing is linear in the input and handles a wide class of grammars, so the objection is not to its power. It is that a conflict is reported against a state number and an item set rather than against the language construct the author was thinking about, which makes tracing the cause a skilled exercise.

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

Post your comment

Please log in or register to post a comment.