in reply to Re: Creating a module with DFA::Simple
in thread Creating a module with DFA::Simple

Ovid,

Do you know a good example using FSA::Rules for creating a parser?

Thanks!
Adrianus

  • Comment on Re^2: Creating a module with DFA::Simple

Replies are listed 'Best First'.
Re^3: Creating a module with DFA::Simple
by Ovid (Cardinal) on Feb 26, 2005 at 19:43 UTC

    Regrettably, no, though it should be suitable for that. If I were you, I would define a very simple grammar (only two or three types of tokens) and try to build the parser from there. It should be relatively easy to port the state machine from this article to FSA::Rules. The nice thing is, if you have GraphViz installed, you can then print out the graph to see if it's equivalent to the diagram in the article:

    my $graph = $fsa->graph; print FH $graph->as_png;

    Cheers,
    Ovid

    New address of my CGI Course.