Hello,

Well I finally got something uploaded to cpan for next meeting.

Tuesday, May 14, 2013, MIT E51-376 7pm-10pm

It's rev 0.600 of my parser module Parse::Gnaw


http://www.cpan.org/authors/id/G/GS/GSLONDON/

 Parse-Gnaw-0.600.tar.gz


It is a revamping of the module. The previous version had
some issues like blowing up on recursive grammars.

Version 0.600 solves this problem by rearchitecting the code.

A cool new feature of the module:

parsing multi-dimensional text blocks, not just one dimensional text.

The following test creates a 2-D block of text and matches/doesn't match
patterns inside teh block.



rule('abgl', 'a','b','g','l');
rule('abcl', 'a','b','c','l');
rule('afkp', 'a','f','k','p');
rule('afki', 'a','f','k','i');


# we're going to construct a basic 2-dimensional string linked list to parse
# but we're not going to run a grammar on it.
# we're just going to see that the 2D linked list got created correctly.

my $raw_2d_string=<<'RAWSTRING';
abcd
efgh
ijkl
mnop
RAWSTRING

my $string1=Parse::Gnaw::LinkedListDimensions2->new(string=>$raw_2d_string);
my $string2=Parse::Gnaw::LinkedListDimensions2->new(string=>$raw_2d_string);
my $string3=Parse::Gnaw::LinkedListDimensions2->new(string=>$raw_2d_string);
my $string4=Parse::Gnaw::LinkedListDimensions2->new(string=>$raw_2d_string);



ok(    $string1->parse('abgl'),   "parse 2d string with abgl rule");
ok(not($string2->parse('abcl')),  "parse 2d string with abcl rule");
ok(    $string3->parse('afkp'),   "parse 2d string with afkp rule");
ok(not($string4->parse('afki')),  "parse 2d string with afki rule");







_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to