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

Discussion

In analyzing the compilation of PL/I (Programming Language One) program, the term "Lexical analysis" is associated with

  • A.recognition of basic syntactic constructs through reductions
  • B.recognition of basic elements and creation of uniform symbols
  • C.creation of more optional matrix
  • D.use of macro processor to produce more optimal assembly code

Answer: B

Lexical analysis is associated with recognition of basic elements and creation of uniform symbols.

In the classic model of a PL/I compiler, the lexical phase scans the source, recognises its basic elements (identifiers, literals, operators and keywords) and replaces each by a uniform symbol, entering identifiers and literals in tables for later phases.

Recognising syntactic constructs through reductions is syntax analysis, and producing optimised matrices or assembly code belongs to the optimisation and code generation phases.

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

Post your comment

Please log in or register to post a comment.