Theory of formal languages - Automaton
- by dader51
Hi everybody !
I'm wondering about formal languages. I have a kind of parser :
It reads à xml-like serialized tree structure and turn it into a multidimmensionnal array. I figured out that i need at least three variables to achieve the job :
$tree = array(); // a new array
$pTree = array(&$tree); // a new array which the first element points to $tree;
$deep = 0;
plus the one containing the sentence splitted into words.
My point is on the similarities between the algorithm deing used and the differents kinds of automatons ( state machines turing machines stack ... ).
The $words variable is the "tape" of the automaton, the test/conditions of the algorithm are
transitions, $deep is the state and $tree is the output. I cannont figure what is $pTree.
So the question is : which is the automaton I implictly use here, and to which formal languages family does it fit ?
And what's about recursion ?