Discussion
Consider the following statements about FIRST and FOLLOW.
1. Epsilon may belong to a FIRST set.
2. The end of input marker may belong to a FOLLOW set.
3. Epsilon may belong to a FOLLOW set.
Answer: D
Correct answer: 1 and 2 only
Statements 1 and 2 are correct: epsilon belongs to the FIRST set of anything that can derive the empty string, and the end of input marker belongs to the FOLLOW set of the start symbol. Statement 3 is wrong - a FOLLOW set contains terminals and the end marker, and epsilon is not something that can follow a symbol.
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