Farkle


Terminal Type

A helper static class to create terminals.

Static members

Static member Description

Terminal.Create(name, regex)

Full Usage: Terminal.Create(name, regex)

Parameters:
    name : string - The terminal's name.
    regex : Regex - The terminal's corresponding regular expression.

Returns: DesigntimeFarkle

Creates a terminal that does not contain any significant information for the parsing application.

name : string

The terminal's name.

regex : Regex

The terminal's corresponding regular expression.

Returns: DesigntimeFarkle

Terminal.Create(name, fTransform, regex)

Full Usage: Terminal.Create(name, fTransform, regex)

Parameters:
    name : string - The terminal's name.
    fTransform : T<'T> - The function that transforms the terminal's position and data to . Must not be null.
    regex : Regex - The terminal's corresponding regular expression.

Returns: DesigntimeFarkle<'T>

Creates a terminal that contains significant information of type .

name : string

The terminal's name.

fTransform : T<'T>

The function that transforms the terminal's position and data to . Must not be null.

regex : Regex

The terminal's corresponding regular expression.

Returns: DesigntimeFarkle<'T>

Terminal.Literal(str)

Full Usage: Terminal.Literal(str)

Parameters:
    str : string - The string literal this terminal will recognize.

Returns: DesigntimeFarkle

Creates a terminal that recognizes a literal string.

It does not return anything.

str : string

The string literal this terminal will recognize.

Returns: DesigntimeFarkle

Terminal.NewLine

Full Usage: Terminal.NewLine

Returns: DesigntimeFarkle

A special kind of DesigntimeFarkle that represents a new line.

This is different and better than a literal of newline characters. If used anywhere in a grammar, it indicates that it is line-based, which means that newline characters are not noise. Newline characters are considered the character sequences \r (deprecated and will be removed in a future release), \n, or \r\n.

Returns: DesigntimeFarkle

Terminal.Virtual(name)

Full Usage: Terminal.Virtual(name)

Parameters:
    name : string - The virtual terminal's name

Returns: DesigntimeFarkle

Creates a virtual terminal. This method is intended for use in advanced scenarios.

name : string

The virtual terminal's name

Returns: DesigntimeFarkle