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.RewriteRule< T > Class Template Reference

Interpreter rewrite rule More...

Inheritance diagram for Mercury.Interpreting.RewriteRule< T >:

Public Member Functions

 RewriteRule (Structure lhs, ActionCall< T > rhs)
 Creates s new RewriteRule. To be a valid rule, the following conditions must hold:
More...
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
override string ToString ()
 
bool Equals (RewriteRule< T > other)
 

Properties

IElement Head [get, set]
 Value of LHS's root node. More...
 
Structure LHS [get, set]
 The Left-Hand side of the rule. More...
 
ActionCall< T > RHS [get, set]
 The Right-Hand side of the rule. More...
 
IReadOnlyList< VariableVariables [get, set]
 

Detailed Description

Interpreter rewrite rule

Type Constraints
T :class 

Definition at line 145 of file RewriteRule.cs.

Constructor & Destructor Documentation

Mercury.Interpreting.RewriteRule< T >.RewriteRule ( Structure  lhs,
ActionCall< T >  rhs 
)

Creates s new RewriteRule. To be a valid rule, the following conditions must hold:

  • LHS is a valid structure
  • RHS is a valid action call
  • each variable in the LHS must be declared at most once
  • each variable in the RHS must be declared in the LHS
  • arguments of action calls match required types
Parameters
lhsThe Left-Hand Side Mercury.Interpreting.Structure.
rhsThe Right-Hand Side Mercury.Interpreting.ActionCall{T}.
Exceptions
System.ArgumentNullExceptionWhen LHS or RHS is null

Definition at line 162 of file RewriteRule.cs.

Member Function Documentation

override bool Mercury.Interpreting.RewriteRule< T >.Equals ( object  obj)

Definition at line 191 of file RewriteRule.cs.

bool Mercury.Interpreting.RewriteRule< T >.Equals ( RewriteRule< T >  other)

Definition at line 214 of file RewriteRule.cs.

override int Mercury.Interpreting.RewriteRule< T >.GetHashCode ( )

Definition at line 197 of file RewriteRule.cs.

override string Mercury.Interpreting.RewriteRule< T >.ToString ( )

Definition at line 200 of file RewriteRule.cs.

Property Documentation

IElement Mercury.Interpreting.RewriteRule< T >.Head
getset

Value of LHS's root node.

Definition at line 177 of file RewriteRule.cs.

Structure Mercury.Interpreting.RewriteRule< T >.LHS
getset

The Left-Hand side of the rule.

Definition at line 180 of file RewriteRule.cs.

ActionCall<T> Mercury.Interpreting.RewriteRule< T >.RHS
getset

The Right-Hand side of the rule.

Definition at line 183 of file RewriteRule.cs.

IReadOnlyList<Variable> Mercury.Interpreting.RewriteRule< T >.Variables
getset

Definition at line 185 of file RewriteRule.cs.


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