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

Discussion

Arrange the steps of constructing an SLR parsing table in the order performed.
1. compute the FOLLOW sets of the nonterminals
2. augment the grammar with a new start production
3. fill the action and goto tables from the items and FOLLOW sets
4. construct the canonical collection of LR(0) item sets

  • A.2 - 4 - 1 - 3
  • B.3 - 1 - 4 - 2
  • C.4 - 2 - 1 - 3
  • D.2 - 1 - 4 - 3

Answer: A

Augmentation comes first so the item sets include the accepting configuration. The collection is then built, FOLLOW computed, and the two tables filled from those ingredients. Every step is mechanical, which is why the whole process can be automated.

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

Post your comment

Please log in or register to post a comment.