Farkle


Farkle.Grammar Namespace

Type/Module Description

AdvanceMode

A type indicating how a group advances.

DFAState

A DFA state. It defines the logic that produces tokens out of strings. It consists of edges that the tokenizer follows, depending on the character it encounters.

DFASymbol (Module)

Functions to work with `DFASymbol`s.

DFASymbol (Type)

A symbol that can be yielded by the DFA.

EGT

Functions to read and write grammars from EGT files. Grammars can be read either from GOLD Parser's Enhanced Grammar Tables (version 5.0) or from Farkle's EGTneo format. EGTneo (new encoding option) is a file format designed for Farkle that is more compact and easier to read. GOLD Parser cannot read EGTneo files. Grammars can only be written in the EGTneo format.

EndingMode

A type indicating how the ending symbol of a group is handled.

Grammar

A context-free grammar according to which Farkle can parse text.

GrammarProperties

Stores additional information about a grammar. The members of this type are purely informative and not used by Farkle's parser in any way. They are mostly used from the templates.

GrammarSource

Indicates where a grammar came from.

Group

A lexical group. In GOLD, lexical groups are used for situations where a number of recognized tokens should be organized into a single "group". This mechanism is most commonly used to handle line and block comments. However, it is not limited to "noise", but can be used for any content.

GroupEnd

A symbol signifying the end of a group.

GroupStart

A symbol signifying the start of a group.

IGrammarProvider

This interface is implemented by Grammars and RuntimeFarkle{TResult}s and provides a uniform way to work with grammars inside runtime Farkles and grammars themselves, while accounting for potential build errors in an exception-free way.

LALRAction

An action to be taken by the LALR parser according to the given `Terminal`.

LALRState

A LALR state. Together, many of them define the parsing logic of a `Grammar`.

LALRSymbol

A symbol that is relevant to the LALR parser.

Noise

A symbol which is produced through a DFA, but is not significant for the grammar and is discarded. An example of a noise symbol would be a source code comment.

Nonterminal

A symbol which is produced by a concatenation of other `Terminal`s and `Nonterminal`s, as the LALR parser dictates. Nonterminals with the same index are considered equal.

Production

A sequence of `Terminal`s and `Nonterminal`s that can produce a specific `Nonterminal`.

Symbols

A type containing all symbols of a grammar, grouped by kind. Group start and end symbols can be found at the group table.

Terminal

A symbol which is produced through a DFA, and is significant for the grammar. Terminals with the same index are considered equal.