The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lingua::Awkwords::Parser - parser for awkwords

SYNOPSIS

  my $parser = Lingua::Awkwords::Parser->new;
  my $tree   = $parser->from_string(q{ [VV]^aa });

DESCRIPTION

Parser::MGC subclass that parses awkword patterns. This module will typically be called from Lingua::Awkwords, so need not be used directly.

The specification this code is based on can be found at

http://akana.conlang.org/tools/awkwords/help.html

though there are differences between this code and the implementation associated with the above documentation; some of these differences are listed as Known Issues; see also comments in the code and the unit tests under the t/ directory of the distribution of this module.

METHODS

parse

Entry point for Parser::MGC; returns the parsed pattern or fails trying. Code that uses this module will likely instead use the new, from_string, from_file methods imported from Parser::MGC.

BUGS

Reporting Bugs

Please report any bugs or feature requests to bug-lingua-awkwords at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Lingua-Awkwords.

Patches might best be applied towards:

https://github.com/thrig/Lingua-Awkwords

Known Issues

There are known (and doubtless various unknown) incompatibilities with the parser of the original code (the online PHP version). In particular,

  • A filter of [VV]^a"a" in the online version does not filter out aa from the results as of August 2017, though the documentation indicates that it should.

  • Filters differ in other ways; the online version filters out aa if given [VV]^aa but not given VV^aa, though otherwise does treat VV the same as [VV].

  • [a*10*20/b] in the original code parses as a weight of 1020 which is then (with a warning) reduced to the maximum 128. This implementation instead throws an error if multiple weights are parsed, and accepts any (supported by perl) integer above 128.

SEE ALSO

Lingua::Awkwords

Lingua::Awkwords::ListOf, Lingua::Awkwords::OneOf, Lingua::Awkwords::String, Lingua::Awkwords::Subpattern

Parser::MGC

AUTHOR

thrig - Jeremy Mates (cpan:JMATES) <jmates at cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2017 by Jeremy Mates

This program is distributed under the (Revised) BSD License: http://www.opensource.org/licenses/BSD-3-Clause