定义: M={Q, ∑, f, q0, F} q = f(q, δ)
σ ∈ Σ
(q, q0, F) ∈ Q
算法:
Stack S ← (-1, -1);
i = 0;
T = q0;
while (T != -1 && i != -1)
{
if (i == 0 && T is Accept)
{
call AcceptCallBack;
}
if (i < T.Children.Count)
{
S ← (T, i + 1);
T = f(T, i);
i = 0;
}
else
{
(T, i) ← S;
}
}