|
Mercury library
1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
|
Represents an alternative of elements. It may match specified symbols or symboltypes (Nonterminals, ...). More...
Public Member Functions | |
| Alternative (SymbolType sm, IEnumerable< Symbol > symbols) | |
| Initializes a new instance of the Alternative class. If symbols contains symbols of type that is present in the sm mask, they will be omitted. More... | |
| bool | MatchesSymbol (Symbol s) |
| Indicates whether this alternative matches the given symbol. More... | |
| override bool | Equals (object obj) |
| override int | GetHashCode () |
| override string | ToString () |
| bool | Equals (Alternative other) |
Protected Attributes | |
| HashSet< Symbol > | smset |
Properties | |
| SymbolType | SymbolMask [get, set] |
| Mask of symbol types this alternative matches regardless the symbol name. More... | |
| IReadOnlyList< Symbol > | Symbols [get, set] |
| List of specific symbols this alternative matches. More... | |
Represents an alternative of elements. It may match specified symbols or symboltypes (Nonterminals, ...).
Definition at line 48 of file Element.cs.
| Mercury.Interpreting.Alternative.Alternative | ( | SymbolType | sm, |
| IEnumerable< Symbol > | symbols | ||
| ) |
Initializes a new instance of the Alternative class. If symbols contains symbols of type that is present in the sm mask, they will be omitted.
| sm | The Symbol mask. |
| symbols | The symbols. |
| System.ArgumentNullException | When symbols is null |
| System.ArgumentException | Argument 'symbols' contains null |
| System.ArgumentException | Empty alternative is not allowed |
Definition at line 67 of file Element.cs.
| override bool Mercury.Interpreting.Alternative.Equals | ( | object | obj | ) |
Definition at line 112 of file Element.cs.
| bool Mercury.Interpreting.Alternative.Equals | ( | Alternative | other | ) |
Definition at line 159 of file Element.cs.
| override int Mercury.Interpreting.Alternative.GetHashCode | ( | ) |
Definition at line 118 of file Element.cs.
| bool Mercury.Interpreting.Alternative.MatchesSymbol | ( | Symbol | s | ) |
Indicates whether this alternative matches the given symbol.
| s | The symbol. |
true if this alternative matches s, false otherwiseDefinition at line 105 of file Element.cs.
| override string Mercury.Interpreting.Alternative.ToString | ( | ) |
Definition at line 130 of file Element.cs.
|
protected |
Definition at line 53 of file Element.cs.
|
getset |
Mask of symbol types this alternative matches regardless the symbol name.
The symbol mask.
Definition at line 92 of file Element.cs.
|
getset |
List of specific symbols this alternative matches.
The symbols.
Definition at line 96 of file Element.cs.
1.8.7