Discussion
Arrange the steps of building a predictive parsing table in the order performed.
1. compute FIRST and FOLLOW for every nonterminal
2. remove left recursion from the grammar
3. fill each table cell from the FIRST and FOLLOW sets
4. left factor the remaining common prefixes
Answer: C
Correct answer: 2 - 4 - 1 - 3
The transformations must come before the analysis, since they change the grammar the sets are computed from. Left recursion is removed first, then common prefixes are factored out, then FIRST and FOLLOW are computed on the resulting grammar, and only then can the table be filled from those sets.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development