Mercury library  1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Properties | List of all members
Mercury.Interpreting.Constant Class Reference

Constant element. Basically equivalent of Mercury.Interpreting.Alternative. More...

Inheritance diagram for Mercury.Interpreting.Constant:
Mercury.Interpreting.Alternative Mercury.Interpreting.IElement

Public Member Functions

 Constant (Symbol symbol)
 Creates a Constant made of one symbol. More...
 
 Constant (IEnumerable< Symbol > symbols)
 Constant that matches any of the specified symbols. More...
 
 Constant (SymbolType sm, IEnumerable< Symbol > symbols)
 Initializes a new instance of the Constant 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 (Constant 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)
 

Properties

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< SymbolSymbols [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< Symbolsmset
 

Detailed Description

Constant element. Basically equivalent of Mercury.Interpreting.Alternative.

Definition at line 178 of file Element.cs.

Constructor & Destructor Documentation

Mercury.Interpreting.Constant.Constant ( Symbol  symbol)

Creates a Constant made of one symbol.

Parameters
symbolThe symbol.

Definition at line 186 of file Element.cs.

Mercury.Interpreting.Constant.Constant ( IEnumerable< Symbol symbols)

Constant that matches any of the specified symbols.

Parameters
symbolsThe sequence symbols.

Definition at line 192 of file Element.cs.

Mercury.Interpreting.Constant.Constant ( SymbolType  sm,
IEnumerable< Symbol symbols 
)

Initializes a new instance of the Constant class. See Mercury.Interpreting.Alternative's constructor for more details.

Parameters
smThe symbol mask.
symbolsThe symbols.

Definition at line 203 of file Element.cs.

Member Function Documentation

override bool Mercury.Interpreting.Constant.Equals ( object  obj)

Definition at line 211 of file Element.cs.

bool Mercury.Interpreting.Constant.Equals ( IElement  other)

Definition at line 235 of file Element.cs.

bool Mercury.Interpreting.Constant.Equals ( Constant  other)

Definition at line 242 of file Element.cs.

override int Mercury.Interpreting.Constant.GetHashCode ( )

Definition at line 217 of file Element.cs.

override string Mercury.Interpreting.Constant.ToString ( )

Definition at line 220 of file Element.cs.

Property Documentation

ElementType Mercury.Interpreting.Constant.Type
getset

Definition at line 229 of file Element.cs.


The documentation for this class was generated from the following file: