Discussion
Which of the following are correct statements in context of compiler ?
(i) A grammar is Left Recursive if we can find some non-terminal ‘A’ which will eventually derive a sentential form with itself as a left symbol.
(ii) Syntax analyzer groups the tokens produced by the scanner into syntactic structures by parsing the expressions and statements.
(iii) A control flow statement is an instruction when executed can cause a change in the subsequent control flow to differ from the natural sequential order in which the instructions are listed.
Answer: C
All three statements are correct, so the answer is (i), (ii) and (iii) only.
(i) A grammar is left recursive if some non-terminal A can derive, in one or more steps, a sentential form beginning with A itself (A ⇒+ Aα); such grammars must be rewritten before top-down parsing.
(ii) The syntax analyser (parser) takes the tokens produced by the lexical analyser, the scanner, and groups them into syntactic structures such as expressions and statements, usually a parse tree.
(iii) A control flow statement, such as a branch, loop or call, is one whose execution can make the next instruction executed differ from the next one listed.
Since every statement is true, the options naming only two of them are incomplete.
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