Discussion
What the scanner hands on to the next phase of the compiler is
Answer: B
Correct answer: a sequence of tokens with their attribute values attached
The scanner groups characters into lexemes and classifies each as a token, attaching attributes - typically a pointer to the symbol table entry for an identifier, or the value of a numeric literal.
The attributes matter as much as the classification: the parser needs only the token type to decide the grammar, but later phases need the identity of the particular identifier or the value of the particular constant. The other three options name outputs of the parser, the semantic analyser and the back end.
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