[−][src]Function kul_core::premade::inmem::parser_no_bind
pub fn parser_no_bind<'input, 'alloc, 'funs, 'bind>(
alloc_from: DatumSlice<'input, 'alloc>
) -> Parser<'input, 'alloc, 'funs, 'bind>
Make a new Parser
that uses the given DatumSlice
value for the
DatumAllocator
, that has no bindings of operators, and that uses the types
chosen by this module.
See the parser
function, which this simply calls with an empty slice for
the bindings.
The returned Parser
will parse all nest forms recursively in the same way
and produce the Datum::Combination
variant to represent each in the
returned ASTs. This produces a simplistic kind of S-expression structure
that is useful when you don't want any special parsing of nested text,
either because you want to prevent that but still be able to analyze the
basic structure, or because your application is so simple that it only uses
the format/language/syntax to this extent.
This uses ()
for the types in the Datum::Extra
and
Error::FailedCombiner
variants, because these variants cannot be produced
when there are no bindings.