Well, i need to make simulator for non-deterministic Push-Down Automaton.
Everything is okey, i know i need to do recursion or something similar. But i do not know how to make that function which would simulate automaton.
I got everything else under control, automaton generator, stack ...
I am doing it in java, so this is maybe only issue that man can bump on, and i did it.
So if anyone have done something similar, i could use advices.
This is my current organisation of code:
C
lasses: class transit:
list -contains non deterministic transitions
state
input sign
stack sign class generator
it generate automaton from file clas NPA
public boolean start() - this function i am having trouble with
Of course problem of separate stacks, and input for every branch.
I tried to solve it with collection of objects NPA and try to start every object, but it doesn work :((..