To precisely define the language A, we first define the context-free grammar G =
(V, Σ, R, S), where V = {S, T, F, X, D} is the set of variables; the alphabet is
Σ = { ., 0, 1, 2, . . . , 9, +, -, *, /, (, ), % }, (1)
which includes a dot for float-point numbers; the starting variable is S; and the rules R
are
S → %T%
T → T+T | T-T | T*T | T/T | (T) | F
F → X.X | X. | .X
X → DX | D
D → 0 | 1 | 2 | · · · | 9
Then we define the language A = L(G), which contains strings that begin with % and
end with %, and in between is an arithmetic expression over floating-point numbers. Draw a PDA for language A