Class Group
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
stringThe name of the group.
start
stringThe sequence of characters that start the group.
end
stringThe sequence of characters that end the group.
options
GroupOptionsOptions to configure the group. Optional.
Returns
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
stringThe name of the group.
start
stringThe sequence of characters that start the group.
end
stringThe sequence of characters that end the group.
transformer
Transformer<char, T>The transformer to apply to the content of the group.
options
GroupOptionsOptions to configure the group. Optional.
Returns
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
stringThe name of the group.
start
stringThe sequence of characters that start the group.
options
GroupOptionsOptions to configure the group. Optional.
Returns
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
stringThe name of the group.
start
stringThe sequence of characters that start the group.
transformer
Transformer<char, T>The transformer to apply to the content of the group.
options
GroupOptionsOptions to configure the group. Optional.
Returns
Type Parameters
T
The type of values the group will produce.