Machine-translated by Google. Questions are authored in English.
Top

Discussion

Match each compiler construction tool with what it generates.
List I
A. scanner generator
B. parser generator
C. syntax directed translation engine
D. data flow engine
List II
1. a translator from rules
2. a lexical analyser from regular expressions
3. analysis results for the optimiser
4. a parser from a context free grammar

  • A.A-4, B-2, C-1, D-3
  • B.A-2, B-4, C-3, D-1
  • C.A-3, B-1, C-4, D-2
  • D.A-2, B-4, C-1, D-3

Answer: D

Correct answer: A-2, B-4, C-1, D-3

Each tool automates one phase from a declarative specification. A scanner generator turns regular expressions into a lexical analyser; a parser generator turns a context-free grammar into a parser.

A syntax directed translation engine turns rules attached to grammar productions into a translator. A data flow engine produces analysis results for the optimiser. Note the pattern: the first three generate code from a specification, while the last generates facts about a particular program.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.