Farkle


BuildError Type

An error the builder encountered.

Union cases

Union case Description

DuplicateProduction(Head, Handle)

Full Usage: DuplicateProduction(Head, Handle)

Parameters:

A production is defined twice.

Head : Nonterminal
Handle : ImmutableArray<LALRSymbol>

EmptyNonterminal Name

Full Usage: EmptyNonterminal Name

Parameters:
    Name : string

A nonterminal has no productions.

Name : string

GrammarNotPrecompiled

Full Usage: GrammarNotPrecompiled

A precompilable designtime Farkle was attempted to be built with its grammar having not been precompiled.

IndistinguishableSymbols Symbols

Full Usage: IndistinguishableSymbols Symbols

Parameters:

Some symbols cannot be distinguished from each other. Superseded by `IndistinguishableSymbols2`.

Symbols : Set<DFASymbol>

IndistinguishableSymbols2(Symbols, ExampleWord)

Full Usage: IndistinguishableSymbols2(Symbols, ExampleWord)

Parameters:

Some symbols cannot be distinguished from each other. Also provides an example string that all symbols match.

Symbols : Set<DFASymbol>
ExampleWord : string

LALRConflict Conflict

Full Usage: LALRConflict Conflict

Parameters:

An LALR conflict did occur.

Conflict : LALRConflict

LALRConflictReport States

Full Usage: LALRConflictReport States

Parameters:

There were LALR conflicts. This error type comes after the specific conflict error messages and contains the grammar's LALR states, including the conflicting actions. It is not displayed when a `FarkleError` is converted to a string, but is used by the precompiler to create an HTML report when a precompiled grammar has conflicts.

States : ImmutableArray<LALRConflictState>

NullableSymbol Symbol

Full Usage: NullableSymbol Symbol

Parameters:

A symbol can contain zero characters. If many symbols are nullable, they will be marked as indistinguishable instead.

Symbol : DFASymbol

RegexParseError(Symbol, Error)

Full Usage: RegexParseError(Symbol, Error)

Parameters:

An error occurred while parsing a regular expression.

Symbol : DFASymbol
Error : ParserError

SymbolLimitExceeded

Full Usage: SymbolLimitExceeded

The grammar has more symbols than the supported limit.

Static members

Static member Description

BuildError.SymbolLimit

Full Usage: BuildError.SymbolLimit

Returns: int

The maximum number of terminals and nonterminals a grammar built by Farkle can have. Currently set to 2^20; sixteen times more of what GOLD Parser can handle. To be more specific, a grammar can have at most 2^20 terminals _and_ 2^20 nonterminals.

Returns: int