Table of Contents

Class Group

Namespace
Farkle.Builder
Assembly
Farkle.dll

Provides factory methods to define lexical groups.

public abstract class Group : IGrammarSymbol, IGrammarBuilder
Inheritance
Group
Implements
Extension Methods

Methods

Block(string, string, string, GroupOptions)

Creates a block group that does not produce a value.

public static IGrammarSymbol Block(string name, string start, string end, GroupOptions options = GroupOptions.None)

Parameters

name string

The name of the group.

start string

The sequence of characters that start the group.

end string

The sequence of characters that end the group.

options GroupOptions

Options to configure the group. Optional.

Returns

IGrammarSymbol

Block<T>(string, string, string, Transformer<char, T>, GroupOptions)

Creates a block group that produces a value.

public static IGrammarSymbol<T> Block<T>(string name, string start, string end, Transformer<char, T> transformer, GroupOptions options = GroupOptions.None)

Parameters

name string

The name of the group.

start string

The sequence of characters that start the group.

end string

The sequence of characters that end the group.

transformer Transformer<char, T>

The transformer to apply to the content of the group.

options GroupOptions

Options to configure the group. Optional.

Returns

IGrammarSymbol<T>

Type Parameters

T

The type of values the group will produce.

Line(string, string, GroupOptions)

Creates a line group that does not produce a value.

public static IGrammarSymbol Line(string name, string start, GroupOptions options = GroupOptions.None)

Parameters

name string

The name of the group.

start string

The sequence of characters that start the group.

options GroupOptions

Options to configure the group. Optional.

Returns

IGrammarSymbol

Line<T>(string, string, Transformer<char, T>, GroupOptions)

Creates a line group that produces a value.

public static IGrammarSymbol<T> Line<T>(string name, string start, Transformer<char, T> transformer, GroupOptions options = GroupOptions.None)

Parameters

name string

The name of the group.

start string

The sequence of characters that start the group.

transformer Transformer<char, T>

The transformer to apply to the content of the group.

options GroupOptions

Options to configure the group. Optional.

Returns

IGrammarSymbol<T>

Type Parameters

T

The type of values the group will produce.

See Also