Farkle


GrammarMetadata Type

Additional information about a grammar to be built.

Each DesigntimeFarkle has one, but the metadata object that will be taken into consideration when building will be the one belonging to the topmost designtime Farkle, on which a build function was called. An exception is made for the operator scopes, which are found in all designtime Farkles of a grammar.

Record fields

Record Field Description

AutoWhitespace

Full Usage: AutoWhitespace

Field type: bool

Whether to discard any whitespace characters encountered outside of any terminal. Farkle considers whitespace the characters: Space, Horizontal Tab, Carriage Return and Line feed.

Field type: bool

CaseSensitive

Full Usage: CaseSensitive

Field type: bool

Whether the grammar is case sensitive.

Field type: bool

Comments

Full Usage: Comments

Field type: ImmutableList<Comment>

The comments this grammar accepts.

Field type: ImmutableList<Comment>

NoiseSymbols

Full Usage: NoiseSymbols

Field type: ImmutableList<string * Regex>

Any other symbols definable by a regular expression that will be discarded if they appear anywhere outside of any terminal.

Field type: ImmutableList<string * Regex>

OperatorScope

Full Usage: OperatorScope

Field type: OperatorScope

An OperatorScope to assist the conflict resolution when building the grammar.

This property will be considered when set in any designtime Farkle of a grammar; not only the topmost one.

Field type: OperatorScope

Static members

Static member Description

GrammarMetadata.Default

Full Usage: GrammarMetadata.Default

Returns: GrammarMetadata

The default metadata of a grammar. According to them, the grammar is not case sensitive and white space is discarded.

Returns: GrammarMetadata

GrammarMetadata.Strict

Full Usage: GrammarMetadata.Strict

Returns: GrammarMetadata

A stricter set of metadata for a grammar. They specify a case sensitive grammar without any whitespace allowed.

Returns: GrammarMetadata