Functions to create and use `RuntimeFarkle`s.
Function or value | Description |
|
Creates a `RuntimeFarkle` from the given `DesigntimeFarkle<'T>`. In case there is a problem with the grammar, the `RuntimeFarkle` will fail every time it is used. If the designtime Farkle is marked for precompilation and a suitable precompiled grammar is found, it will be ignored.
|
Full Usage:
buildPrecompiled pcdf
Parameters:
PrecompilableDesigntimeFarkle<'a>
Returns: RuntimeFarkle<'a>
|
Creates a `RuntimeFarkle` from the given typed `PrecompilableDesigntimeFarkle`. In case the designtime Farkle has not been precompiled, the `RuntimeFarkle` will fail every time it is used. The precompiler will run by installing the package `Farkle.Tools.MSBuild`. Learn more at https://teo-tsirpanis.github.io/Farkle/the-precompiler.html
|
|
Creates a syntax-checking `RuntimeFarkle` from the given untyped `PrecompilableDesigntimeFarkle`. In case the designtime Farkle has not been precompiled, the `RuntimeFarkle` will fail every time it is used. The precompiler will run by installing the package `Farkle.Tools.MSBuild`. Learn more at https://teo-tsirpanis.github.io/Farkle/the-precompiler.html
|
|
Creates a syntax-checking `RuntimeFarkle` from an untyped `DesigntimeFarkle`. No transformers or fusers from the designtime Farkle will be executed.
|
|
Changes the runtime Farkle's returning type to object, without changing its post-processor.
|
Full Usage:
changePostProcessor pp rf
Parameters:
PostProcessor<'a>
rf : RuntimeFarkle<'TResult>
Returns: RuntimeFarkle<'a>
|
Changes the post-processor of a `RuntimeFarkle`.
|
Full Usage:
changeTokenizer fTokenizer rf
Parameters:
Grammar -> 'a
rf : RuntimeFarkle<'TResult>
Returns: RuntimeFarkle<'TResult>
|
Changes the tokenizer that will be used by this runtime Farkle. This function accepts a function that takes a `Grammar` and returns a `Tokenizer`.
|
Full Usage:
create postProcessor grammar
Parameters:
PostProcessor<'a>
grammar : Grammar
Returns: RuntimeFarkle<'a>
|
Creates a `RuntimeFarkle` from the given grammar and post-processor.
|
Full Usage:
markForPrecompile df
Parameters:
DesigntimeFarkle<'a>
Returns: PrecompilableDesigntimeFarkle<'a>
|
Marks the given designtime as available to have its grammar precompiled ahead of time. Learn more, including usage restrictions at https://teo-tsirpanis.github.io/Farkle/the-precompiler.html
|
Full Usage:
markForPrecompileU df
Parameters:
DesigntimeFarkle
Returns: PrecompilableDesigntimeFarkle
|
The untyped edition of `markForPrecompile`.
|
Full Usage:
parseChars rf input
Parameters:
RuntimeFarkle<'TResult>
input : CharStream
Returns: Result<'TResult, FarkleError>
|
Parses and post-processes a `CharStream`.
|
Full Usage:
parseFile rf path
Parameters:
RuntimeFarkle<'a>
path : string
Returns: Result<'a, FarkleError>
|
Parses and post-processes a file at the given path.
|
Full Usage:
parseMemory rf input
Parameters:
RuntimeFarkle<'a>
input : ReadOnlyMemory<char>
Returns: Result<'a, FarkleError>
|
Parses and post-processes a `ReadOnlyMemory` of characters.
|
Full Usage:
parseString rf inputString
Parameters:
RuntimeFarkle<'a>
inputString : string
Returns: Result<'a, FarkleError>
|
Parses and post-processes a string.
|
Full Usage:
parseTextReader rf textReader
Parameters:
RuntimeFarkle<'a>
textReader : TextReader
Returns: Result<'a, FarkleError>
|
Parses and post-processes a .NET `TextReader`. Its content is lazily read.
|
|
Changes the post-processor of a runtime Farkle to a dummy one suitable for syntax-checking instead of parsing.
|