Lingua::Awkwords::Parser - parser for awkwords
my $parser = Lingua::Awkwords::Parser->new; my $tree = $parser->from_string(q{ [VV]^aa });
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.
t/
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.
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.
bug-lingua-awkwords at rt.cpan.org
Patches might best be applied towards:
https://github.com/thrig/Lingua-Awkwords
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.
[VV]^a"a"
aa
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].
[VV]^aa
VV^aa
VV
[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.
[a*10*20/b]
1020
128
Lingua::Awkwords
Lingua::Awkwords::ListOf, Lingua::Awkwords::OneOf, Lingua::Awkwords::String, Lingua::Awkwords::Subpattern
Parser::MGC
thrig - Jeremy Mates (cpan:JMATES) <jmates at cpan.org>
<jmates at cpan.org>
Copyright (C) 2017 by Jeremy Mates
This program is distributed under the (Revised) BSD License: http://www.opensource.org/licenses/BSD-3-Clause
To install Lingua::Awkwords, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::Awkwords
CPAN shell
perl -MCPAN -e shell install Lingua::Awkwords
For more information on module installation, please visit the detailed CPAN module installation guide.