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

Discussion

A language for which no LL(1) grammar exists can still be parsed by

  • A.no parser at all, since LL(1) is the most powerful method
  • B.a plain finite machine built out of the scanner patterns
  • C.an LL(1) parser once the grammar is left factored
  • D.an LR parser, which decides after seeing a whole right side

Answer: D

LR methods postpone the decision until the end of a construct and so cover a strictly larger class. This is the main practical reason bottom up generators dominate. Language designers rarely constrain their syntax to fit the smaller class.

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

Post your comment

Please log in or register to post a comment.