Text.GrammarCombinators.Library.Numeric
- data DecimalInteger
- data NumericDomain ix where
- data family NumericValue n ix
- numericGrammar :: ExtendedContextFreeGrammar NumericDomain Char
- procNumericGrammar :: Read n => ProcessingExtendedContextFreeGrammar NumericDomain Char (NumericValue n)
Documentation
data DecimalInteger Source
data NumericDomain ix whereSource
This domain is intended to be reused in grammars where decimal integers are used.
You can refer to the DecimalInteger non-terminal using the lib primitive from the ProductionRuleWithLibrary type class
and then obtain the combined grammar by combining your grammar with procNumericGrammar using the
Text.GrammarCombinators.Transform.CombineGrammars.combineGrammars function
Constructors
| DecimalInteger :: NumericDomain DecimalInteger |
data family NumericValue n ix Source
procNumericGrammar :: Read n => ProcessingExtendedContextFreeGrammar NumericDomain Char (NumericValue n)Source
The standard processing grammar for domain NumericDomain, intended to be combined with other grammars using
the Text.GrammarCombinators.Transform.CombineGrammars.combineGrammars function.