Farkle


RuntimeFarkle Module

Functions to create and use `RuntimeFarkle`s.

Functions and values

Function or value Description

build df

Full Usage: build df

Parameters:
Returns: RuntimeFarkle<'a>

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.

df : DesigntimeFarkle<'a>
Returns: RuntimeFarkle<'a>

buildPrecompiled pcdf

Full Usage: buildPrecompiled pcdf

Parameters:
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

pcdf : PrecompilableDesigntimeFarkle<'a>
Returns: RuntimeFarkle<'a>

buildPrecompiledUntyped pcdf

Full Usage: buildPrecompiledUntyped pcdf

Parameters:
Returns: RuntimeFarkle<unit>

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

pcdf : PrecompilableDesigntimeFarkle
Returns: RuntimeFarkle<unit>

buildUntyped df

Full Usage: buildUntyped df

Parameters:
Returns: RuntimeFarkle<unit>

Creates a syntax-checking `RuntimeFarkle` from an untyped `DesigntimeFarkle`. No transformers or fusers from the designtime Farkle will be executed.

df : DesigntimeFarkle
Returns: RuntimeFarkle<unit>

cast rf

Full Usage: cast rf

Parameters:
Returns: RuntimeFarkle<obj>

Changes the runtime Farkle's returning type to object, without changing its post-processor.

rf : RuntimeFarkle<'TResult>
Returns: RuntimeFarkle<obj>

changePostProcessor pp rf

Full Usage: changePostProcessor pp rf

Parameters:
Returns: RuntimeFarkle<'a>

Changes the post-processor of a `RuntimeFarkle`.

pp : PostProcessor<'a>
rf : RuntimeFarkle<'TResult>
Returns: RuntimeFarkle<'a>

changeTokenizer fTokenizer rf

Full Usage: changeTokenizer fTokenizer rf

Parameters:
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`.

fTokenizer : Grammar -> 'a
rf : RuntimeFarkle<'TResult>
Returns: RuntimeFarkle<'TResult>

create postProcessor grammar

Full Usage: create postProcessor grammar

Parameters:
Returns: RuntimeFarkle<'a>

Creates a `RuntimeFarkle` from the given grammar and post-processor.

postProcessor : PostProcessor<'a>
grammar : Grammar
Returns: RuntimeFarkle<'a>

markForPrecompile df

Full Usage: markForPrecompile df

Parameters:
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

df : DesigntimeFarkle<'a>
Returns: PrecompilableDesigntimeFarkle<'a>

markForPrecompileU df

Full Usage: markForPrecompileU df

Parameters:
Returns: PrecompilableDesigntimeFarkle

The untyped edition of `markForPrecompile`.

df : DesigntimeFarkle
Returns: PrecompilableDesigntimeFarkle

parseChars rf input

Full Usage: parseChars rf input

Parameters:
Returns: Result<'TResult, FarkleError>

Parses and post-processes a `CharStream`.

rf : RuntimeFarkle<'TResult>
input : CharStream
Returns: Result<'TResult, FarkleError>

parseFile rf path

Full Usage: parseFile rf path

Parameters:
Returns: Result<'a, FarkleError>

Parses and post-processes a file at the given path.

rf : RuntimeFarkle<'a>
path : string
Returns: Result<'a, FarkleError>

parseMemory rf input

Full Usage: parseMemory rf input

Parameters:
Returns: Result<'a, FarkleError>

Parses and post-processes a `ReadOnlyMemory` of characters.

rf : RuntimeFarkle<'a>
input : ReadOnlyMemory<char>
Returns: Result<'a, FarkleError>

parseString rf inputString

Full Usage: parseString rf inputString

Parameters:
Returns: Result<'a, FarkleError>

Parses and post-processes a string.

rf : RuntimeFarkle<'a>
inputString : string
Returns: Result<'a, FarkleError>

parseTextReader rf textReader

Full Usage: parseTextReader rf textReader

Parameters:
Returns: Result<'a, FarkleError>

Parses and post-processes a .NET `TextReader`. Its content is lazily read.

rf : RuntimeFarkle<'a>
textReader : TextReader
Returns: Result<'a, FarkleError>

syntaxCheck rf

Full Usage: syntaxCheck rf

Parameters:
Returns: RuntimeFarkle<unit>

Changes the post-processor of a runtime Farkle to a dummy one suitable for syntax-checking instead of parsing.

rf : RuntimeFarkle<'a>
Returns: RuntimeFarkle<unit>