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

Discussion

Yacc and Bison generate parsers of which class?

  • A.canonical LR(1) with no state merging performed
  • B.operator precedence parsers for expression grammars
  • C.LALR(1)
  • D.LL(1) predictive parsers driven by a table

Answer: C

Both tools produce LALR(1) parsers by default. The choice reflects the balance between grammar coverage and table size that suits nearly all programming language grammars. Canonical LR tables would be several times larger for very little extra coverage.

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

Post your comment

Please log in or register to post a comment.