Farkle


DFAState Type

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.

Record fields

Record Field Description

AcceptSymbol

Full Usage: AcceptSymbol

Field type: DFASymbol option

Whether this state accepts a symbol or not.

Field type: DFASymbol option

AnythingElse

Full Usage: AnythingElse

Field type: uint32 option

The state to maybe go to (or fail) in case the character had no matching edge.

Field type: uint32 option

Edges

Full Usage: Edges

Field type: RangeMap<char, uint32 option>

The edges of the state, that match a character to a next state, using a custom data structure. A character can be set to explicitly fail, prohibiting the use of `AnythingElse`.

Field type: RangeMap<char, uint32 option>

Index

Full Usage: Index

Field type: uint32

The index of the state in the DFA state table.

Field type: uint32