next up previous
Next: About this document ... Up: Exercise 4 Previous: Exercise 4

Hints.

An automaton type is needed. This could be made of A symbol table is also needed. An entry of the symbol table may consist of To make thinks simple you may design your desk calculator is two steps
Low-level.
At this level you restrict the regular expressions between { and } to letters of the alphabet $ \Sigma$. So, the user needs to replace
? L1 := {a(a|b)*}
by the following sequence of commands
? A := {a}
= defined A
? B := {b}
= defined B
? C0 := A | B
= defined C0
? C1 := C0*
= defined C1
? L1 := A.C1
= defined L1
High-level.
Now the user can use any regular expressions between { and }.
\fbox{{\bf Bonus.} If your answers to Exercise 2 are correct, then this
{\bf High-level} is optional.}


next up previous
Next: About this document ... Up: Exercise 4 Previous: Exercise 4
Marc Moreno Maza
2004-12-01