A group of associativity groups sorted by precedence.
A symbol in an operator scope has higher precedence than another one if it appears in a group below the former symbol's group.
If the same symbol is specified in multiple associativity groups, it will have the precedence of the earliest group in which it appeared.
Symbols from multiple operator scopes cannot be compared for precedence.
A symbol can belong in only one operator scope; if it belongs in more, the operator scope to which the symbol will be assigned is undefined.
Operator scopes are used to automatically resolve Shift-Reduce conflicts. Resolving Reduce-Reduce conflicts can also happen but it must be explicitly opt-in by passing a boolean argument of in the first argument of the appropriate operator scope's constructor overloads.
Constructor | Description |
Full Usage:
OperatorScope(assocGroups)
Parameters:
AssociativityGroup[]
Returns: OperatorScope
|
|
Full Usage:
OperatorScope(resolveReduceReduceConflicts, assocGroups)
Parameters:
bool
assocGroups : AssociativityGroup[]
Returns: OperatorScope
|
|
Full Usage:
OperatorScope(resolvesReduceReduceConflicts, assocGroups)
Parameters:
bool
assocGroups : AssociativityGroup seq
Returns: OperatorScope
|
|
Instance member | Description |
Full Usage:
this.ResolvesReduceReduceConflict
Returns: bool
|
Whether Farkle uses this operator scope to automatically resolve Reduce-Reduce conflicts. Because the impact of this feature is unknown, it is set to false by default. It can be changed by passing true to a constructor overload that accepts a boolean.
|
Static member | Description |
|
An operator scope that does not contain any associativity groups.
|