MarpaX::ESLIF::Value::Interface - MarpaX::ESLIF's value interface
version 5.0.7
Value interface is a list of methods that are required by MarpaX::ESLIF at run-time to perform valuation. It has to be an object instance, referenced with $valueInterface below.
$valueInterface
Returns the rank order preference.
When the interface returns true, only the choices with the highest rank are kept. This method is used at valuation instance creation step only.
Orders the parse tree values by their rank value. This method is used at valuation instance creation step only.
Returns the ambiguity acceptance.
Accept ambiguous parse tree. This method is used at valuation instance creation step only.
Returns the null acceptance.
Accept a null parse tree value (e.g. when the start rule is not complete). This method is used at valuation instance creation step only.
Returns the maximum number of wanted parses, 0 for all parse trees.
A very ambiguous parsing can provide a lot of parse tree values, it is possible to reduce such number, at the cost of not having all the valuation possibilities. This method is used at valuation instance creation step only.
Store the parsing result.
When valuation is successful, marpaESLIF is using this callback.
Returns the parsing result.
marpaESLIF is not using this method per-se, but it is nevertheless required to ensure the interface coherency v.s. the getResult() required method.
getResult()
At each symbol or rule callback, the following values are localized:
$MarpaX::ESLIF::Context::symbolName
Symbol name in case of a symbol callback, undef otherwise.
undef
$MarpaX::ESLIF::Context::symbolNumber
Symbol number in case of a symbol callback, undef otherwise.
$MarpaX::ESLIF::Context::ruleName
Rule name in case of a rule callback, undef otherwise.
$MarpaX::ESLIF::Context::ruleNumber
Rule number in case of a rule callback, undef otherwise.
$MarpaX::ESLIF::Context::grammar
Grammar instance.
Stores symbol name. Always set in case of a symbol callback, undef otherwise.
Stores symbol number. Always set in case of a symbol callback, undef otherwise.
Stores rule name. Always set in case of a rule callback, undef otherwise.
Stores rule number. Always set in case of a rule callback, undef otherwise.
Stores grammar instance.
Jean-Damien Durand <jeandamiendurand@free.fr>
This software is copyright (c) 2017 by Jean-Damien Durand.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install MarpaX::ESLIF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MarpaX::ESLIF
CPAN shell
perl -MCPAN -e shell install MarpaX::ESLIF
For more information on module installation, please visit the detailed CPAN module installation guide.