|
Mercury library
1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
|
Represents a variable element that captures value and can be used on the RHS of the RewriteRule as an argument More...
Public Member Functions | |
| Variable () | |
| Creates an anonymous variable, an equivalent of Mercury.Interpreting.Wildcard that matches exactly one symbol More... | |
| Variable (string name, SymbolType ws, IEnumerable< Symbol > symbols) | |
| Initializes a new instance of the variable class. See Mercury.Interpreting.Alternative's constructor for more details. More... | |
| override bool | Equals (object obj) |
| override int | GetHashCode () |
| override string | ToString () |
| bool | Equals (IElement other) |
| bool | Equals (Variable other) |
Public Member Functions inherited from 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. 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) |
Static Public Member Functions | |
| static bool | IsValidName (string name) |
| Determines whether the specified string is a valid variable name. More... | |
Properties | |
| string | Name [get, set] |
| Name of the variable More... | |
| ElementType | Type [get, set] |
Properties inherited from Mercury.Interpreting.Alternative | |
| 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... | |
Properties inherited from Mercury.Interpreting.IElement | |
| ElementType | Type [get] |
| Element type More... | |
Additional Inherited Members | |
Protected Attributes inherited from Mercury.Interpreting.Alternative | |
| HashSet< Symbol > | smset |
Represents a variable element that captures value and can be used on the RHS of the RewriteRule as an argument
Definition at line 261 of file Element.cs.
| Mercury.Interpreting.Variable.Variable | ( | ) |
Creates an anonymous variable, an equivalent of Mercury.Interpreting.Wildcard that matches exactly one symbol
Definition at line 269 of file Element.cs.
| Mercury.Interpreting.Variable.Variable | ( | string | name, |
| SymbolType | ws, | ||
| IEnumerable< Symbol > | symbols | ||
| ) |
Initializes a new instance of the variable class. See Mercury.Interpreting.Alternative's constructor for more details.
| name | The name of variable. |
| ws | The symbol mask. |
| symbols | The symbols. |
| System.ArgumentException |
Definition at line 282 of file Element.cs.
| override bool Mercury.Interpreting.Variable.Equals | ( | object | obj | ) |
Definition at line 318 of file Element.cs.
| bool Mercury.Interpreting.Variable.Equals | ( | IElement | other | ) |
Definition at line 342 of file Element.cs.
| bool Mercury.Interpreting.Variable.Equals | ( | Variable | other | ) |
Definition at line 349 of file Element.cs.
| override int Mercury.Interpreting.Variable.GetHashCode | ( | ) |
Definition at line 324 of file Element.cs.
|
static |
Determines whether the specified string is a valid variable name.
| name | The name. |
true if the name is valid, otherwise it returns (surprisingly) false. Definition at line 307 of file Element.cs.
| override string Mercury.Interpreting.Variable.ToString | ( | ) |
Definition at line 327 of file Element.cs.
|
getset |
Name of the variable
Definition at line 293 of file Element.cs.
|
getset |
Definition at line 336 of file Element.cs.
1.8.7