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
namestringThe name of the group.
startstringThe sequence of characters that start the group.
endstringThe sequence of characters that end the group.
optionsGroupOptionsOptions 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
namestringThe name of the group.
startstringThe sequence of characters that start the group.
endstringThe sequence of characters that end the group.
transformerTransformer<char, T>The transformer to apply to the content of the group.
optionsGroupOptionsOptions to configure the group. Optional.
Returns
Type Parameters
TThe 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
namestringThe name of the group.
startstringThe sequence of characters that start the group.
optionsGroupOptionsOptions 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
namestringThe name of the group.
startstringThe sequence of characters that start the group.
transformerTransformer<char, T>The transformer to apply to the content of the group.
optionsGroupOptionsOptions to configure the group. Optional.
Returns
Type Parameters
TThe type of values the group will produce.