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

Discussion

Arrange the steps of building a scanner from token specifications in the order they are performed.
1. convert it to a deterministic automaton by the subset construction
2. write a regular expression for each token
3. minimise the deterministic automaton and emit the table
4. build a nondeterministic automaton from the expressions

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

Answer: B

The pipeline moves from specification to NFA to DFA to a minimised table. Each step is mechanical, which is precisely why scanner generators can be trusted with the whole process. The author writes only the patterns and actions and never touches the automaton itself.

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

Post your comment

Please log in or register to post a comment.