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

Discussion

A transition diagram in scanner design is

  • A.a graph whose edges are labelled with input characters
  • B.the parse tree produced by the syntax analysis phase
  • C.a listing of the tokens that the scanner will recognise
  • D.the flow graph over which data flow analysis is performed

Answer: A

Nodes are states and edges are moves on input characters. Hand written scanners are often coded directly from such diagrams, with each state becoming a labelled section of code. Generated scanners encode the same diagram as a table rather than as explicit code.

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

Post your comment

Please log in or register to post a comment.