Theory of formal languages - Automaton

Posted by dader51 on Stack Overflow See other posts from Stack Overflow or by dader51
Published on 2010-05-23T17:11:00Z Indexed on 2010/05/23 17:21 UTC
Read the original article Hit count: 360

Filed under:

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 ?

© Stack Overflow or respective owner

Related posts about language-theory