A
Parser
is typically used to take a user-input string and convert
it to a machine-readable format.
For example, module:caplin/element/parser/DateParser
can be used to convert
user entered date (in a variety of ways) into a machine-readable form.
If the value cannot be parsed then the parser 'fails' by returning null,
which allows the Renderer framework to determine the correct sequence of
parsers that need to be applied to a value in order to obtain a result.
Therefore Parser
s, whether applied individually and in combination,
are not guaranteed to successfully parse a value.
All Parser
implementations are singletons.
- Implementations:
- module:caplin/element/parser/AmountParser
- module:caplin/element/parser/BracketsParser
- module:caplin/element/parser/BRJSParserWrapper
- module:caplin/element/parser/DateParser
- module:caplin/element/parser/KeyValueParser
- module:caplin/element/parser/LocalisedAmountParser
- module:caplin/element/parser/RegExpParser
- module:caplin/element/parser/ThousandsParser
- module:caplin/element/parser/UpperCaseParser
Extends
- module:br/presenter/parser/Parser