Next Higher-Order Parsing 30 

新しいツールNew tools

        lookfor()
        conc()
        alt()
        sub this_but_not_that {
          my ($A, $B) = @_;
          my $parser = sub {    
            my $in = shift;
            my ($res, $out) = $A->($in)
                or return;
            if ($B->($in)) { return; }
            return ($res, $out);
          };
          return $parser;
        }

Next Copyright © 2007 M. J. Dominus