Dispose(PnfaChoice(aData));
end;
procedure PushChoice( aStack : TtdStack;
aInx : integer;
aMove : integer;
aState : TnfaState);
var
Choice : PnfaChoice;
begin
New(Choice);
Choice^.chInx := aInx;
Choice^.chMove := aMove;
Choice^.chState := aState;
aStack.Push(Choice);
end;
procedure PopChoice(aStack : TtdStack;
var aInx : integer;
var aMove : integer;
var aState : TnfaState);
var
Choice : PnfaChoice;
begin
Choice := PnfaChoice(aStack.Pop);
aInx := Choice^.chInx;
aMove := Choice^.chMove;
aState := Choice^.chState;
Dispose(Choice);
end;
function IsValidNumberNFA(const S : string): boolean;
var