A reusable parser and post-processor, created for a specific grammar, and returning a specific type of object that best describes an expression of the language of this grammar.
Its parsing methods return an F# result type containing either the post-processed return type, or a type describing what did wrong and where.
Exceptions during post-processing (apart from ParserApplicationException) are thrown after being wrapped in a PostProcessorException.
Record Field | Description |
|
|
|
|
|
|
Instance member | Description | ||
|
|
||
Full Usage:
this.ChangePostProcessor
Parameters:
PostProcessor<'TNewResult>
-
The new post-processor.
Returns: RuntimeFarkle<'TNewResult>
A new runtime Farkle with ite post-
processor changed to pp.
|
|
||
Full Usage:
this.ChangeTokenizer
Returns: RuntimeFarkle<'TResult>
A new runtime Farkle that will parse text with
tokenizers of type |
A new tokenizer will be created with each parse operation.
|
||
Full Usage:
this.ChangeTokenizer
Parameters:
TokenizerFactory
-
The new tokenizer factory
Returns: RuntimeFarkle<'TResult>
A new runtime Farkle that will parse text with the tokenizer
tokenizerFactory will create.
|
A new tokenizer will be created with each parse operation.
|
||
Full Usage:
this.GetBuildErrorMessage
Returns: string
|
Returns a user-friendly error message that describes what had gone wrong while building, or an empty string if building had been successful.
|
||
|
Returns a list of `BuildError` objects that describe what had gone wrong while building, or returns an empty list if building had been successful.
|
||
|
|
||
Full Usage:
this.IsBuildSuccessful
Returns: bool
|
Returns whether building was successful. If loaded from an EGT file, it will always return true.
|
||
Full Usage:
this.Parse
Parameters:
TextReader
-
The text reader to parse.
Returns: Result<'TResult, FarkleError>
An F# result type containing either the
post-processed return type, or a type describing
what did wrong and where.
|
The text reader's content will be lazily read.
|
||
Full Usage:
this.Parse
Parameters:
string
-
The string to parse.
Returns: Result<'TResult, FarkleError>
An F# result type containing either the
post-processed return type, or a type describing
what did wrong and where.
|
Parses and post-processes a string.
|
||
Full Usage:
this.Parse
Parameters:
ReadOnlyMemory<char>
-
The read-only memory to parse.
Returns: Result<'TResult, FarkleError>
An F# result type containing either the
post-processed return type, or a type describing
what did wrong and where.
|
|
||
Full Usage:
this.Parse
Parameters:
CharStream
-
The character stream to parse.
Returns: Result<'TResult, FarkleError>
An F# result type containing either the
post-processed return type, or a type describing
what did wrong and where.
|
|
||
Full Usage:
this.ParseFile
Parameters:
string
-
The path of the file to parse.
Returns: Result<'TResult, FarkleError>
An F# result type containing either the
post-processed return type, or a type describing
what did wrong and where.
|
Parses and post-processes a file. The file's content will be lazily read.
|
||
|
Changes the PostProcessor of this runtime Farkle to a dummy one that is useful for syntax-checking instead of parsing.
|
Static member | Description |
Full Usage:
RuntimeFarkle.Create(grammar, postProcessor)
Parameters:
Grammar
postProcessor : PostProcessor<'TResult>
Returns: RuntimeFarkle<'TResult>
|