Class AssociativityGroup
- Namespace
- Farkle.Builder.OperatorPrecedence
- Assembly
- Farkle.dll
Represents a collection of symbols in a grammar to be built that have the same precedence and a specific type of associativity.
public class AssociativityGroup
- Inheritance
-
AssociativityGroup
- Derived
Constructors
AssociativityGroup(AssociativityType, params ImmutableArray<object>)
Creates an AssociativityGroup.
public AssociativityGroup(AssociativityType associativityType, params ImmutableArray<object> symbols)
Parameters
associativityType
AssociativityTypeThe AssociativityType of the group.
symbols
ImmutableArray<object>The symbols that belong to the group.
AssociativityGroup(AssociativityType, params object[])
Creates an AssociativityGroup.
public AssociativityGroup(AssociativityType associativityType, params object[] symbols)
Parameters
associativityType
AssociativityTypeThe AssociativityType of the group.
symbols
object[]The symbols that belong to the group.
Properties
AssociativityType
The AssociativityType of this group.
public AssociativityType AssociativityType { get; }
Property Value
Symbols
The symbols that belong to this group.
public ImmutableArray<object> Symbols { get; }
Property Value
Remarks
The items of this array can correspond to the following kinds of symbols:
- Terminals, nonterminals and their equivalents, by passing their IGrammarSymbol instance.
- Literals, by passing the string of their value.
- Productions, by passing the object that was passed to WithPrecedence(object) or returned from WithPrecedence<T>(T, out object), when building the production.