Shishi

Shishi is a Perl wrapper for the shishi parsing library.
Download

Shishi Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Simon Cozens
  • Publisher web site:
  • http://search.cpan.org/~simon/Sub-Versive-0.01/Versive.pm

Shishi Tags


Shishi Description

Shishi is a Perl wrapper for the shishi parsing library. Shishi is a Perl wrapper for the shishi parsing library.SYNOPSIS use Shishi; # Create a parser my $parser = new Shishi("some name"); # Add a basic node my $nodea = Shishi::Node->new("start"); $parser->add_node($nodea); # Add a node with a simple rule: # State C: match 'c' -> go to ACCEPT state my $nodec = Shishi::Node->new("C")->add_decision( new Shishi::Decision(target => 'c', type => 'char', action => 'finish') ); # State B: match 'b' -> go to state C my $nodeb = Shishi::Node->new("B")->add_decision( new Shishi::Decision(target => 'b', type => 'char', action => 'continue', next_node=>$nodec)); # From the first node: match 'a' -> go to state B $parser->start_node->add_decision( new Shishi::Decision(target => 'a', type => 'char', action => 'continue', next_node => $nodeb) ); # Tell the parser that these states belong. (Helps with GC) $parser->add_node($nodeb); $parser->add_node($nodec); # We now have a state machine which accepts 'abc': ok(!$parser->execute(Shishi->new_match("ab"))); ok($parser->execute(Shishi->new_match("abc"))); Requirements: · Perl


Shishi Related Software