A generic deterministic pushdown automaton simulator in javascript. Also supports multiple stacks (turing complete), a single stack (context-free languages) and no stack (finite automaton).
M = {Σ, Q, Π, q0, F, V}
Where:
M := Machine
Σ := Alphabet
Q := States set
Π := Program function
q0 := Initial state (q0 ∈ Q)
F := Final states
V := Auxiliary alphabet
Π(qa, r, p1, ..., pn) = (qb, w1, ..., wn)
Where:
qa := Current state (qa ∈ Q)
qb := Next state (qb ∈ Q)
r := symbol read from the queue (r ∈ Σ)
pi := symbol read (popped) from the ith stack (r ∈ Σ)
wj := symbol written (pushed) to the jth stack (w ∈ Σ ∪ V)
[Click here] (http://inf.ufrgs.br/~aleuck/)
