Discussion
The input to the lexical analyser is
Answer: A
Correct answer: a stream of characters making up the source program
The lexical analyser is the first phase to touch the program, so its input is the raw character stream as it stands in the file.
Its output is a stream of tokens, which is what the parser consumes - the second option describes the input to the next phase rather than to this one. A syntax tree and three-address code are produced later still, by the parser and the intermediate code generator. Each phase's input is the previous phase's output, and the scanner sits at the head of the chain.
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