Mercury library 1.0 Translation of CFG grammars into an object model (Bachelor's thesis).

- Main Page
- Packages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties
Public Member Functions | Properties | List of all members
Mercury.Interpreting.SemanticInterpreter< T > Class Template Reference

Represent the semantic analysis with interpretation. Consists of two interpreters, the first one rewrites parse trees, the second one interprets them. This class serves as a wrapper so it could be used in the Mercury.Analyser{T,TResult} class. More...

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

## Public Member Functions
| SemanticInterpreter (IInterpreter< Tree< Symbol >> semintr, IInterpreter< T > finintr)
| Initializes a new instance of the SemanticInterpreter{T} class. More...
InterpreterResult< T > | Interpret (Tree< Symbol > tree)
| Interprets the tree using rewrite rules. More...
IReadOnlyList < InterpreterResult< T > > | Interpret (IReadOnlyList< Tree< Symbol >> trees)
| Interprets trees using parallelism (if underlying interprets use it). More...

## Properties
RewriteRuleCollection< Tree < Symbol > > | SemanticRules`[get]`
| Gets the semantic rules (those that only rewrite trees). More...
RewriteRuleCollection< T > | RewriteRules`[get]`
| Returns the rewrite rules. More...
Properties inherited from Mercury.Interpreting.IInterpreter< T >
RewriteRuleCollection< T > | RewriteRules`[get]`
| The collection of rewrite rules used by the interpreter More...

## Detailed Description

Represent the semantic analysis with interpretation. Consists of two interpreters, the first one rewrites parse trees, the second one interprets them. This class serves as a wrapper so it could be used in the Mercury.Analyser{T,TResult} class.

Template Parameters

  T | Interpreter output type.

Type Constraints

  T | : | class |

Definition at line 431 of file Interpreter.cs.

## Constructor & Destructor Documentation

Mercury.Interpreting.SemanticInterpreter< T >.SemanticInterpreter | ( | IInterpreter< Tree< Symbol >> | semintr,
|  | IInterpreter< T > | finintr
| ) |  |

Initializes a new instance of the SemanticInterpreter{T} class.

Parameters

  semintr | The semantic interpreter.
  finintr | The actual interpreter.

Exceptions

  System.ArgumentNullException | When either of parameters is `null`.

Definition at line 445 of file Interpreter.cs.

## Member Function Documentation

InterpreterResult<T> Mercury.Interpreting.SemanticInterpreter< T >.Interpret | ( | Tree< Symbol > | tree | ) |

Interprets the tree using rewrite rules.

Parameters

  tree | The tree to interpret.

Returns
  Result of the interpretation.

Implements Mercury.Interpreting.IInterpreter< T >.

Definition at line 472 of file Interpreter.cs.

IReadOnlyList<InterpreterResult<T> > Mercury.Interpreting.SemanticInterpreter< T >.Interpret | ( | IReadOnlyList< Tree< Symbol >> | trees | ) |

Interprets trees using parallelism (if underlying interprets use it).

Parameters

  trees | List of trees

Returns

Implements Mercury.Interpreting.IInterpreter< T >.

Definition at line 496 of file Interpreter.cs.

## Property Documentation

RewriteRuleCollection<T> Mercury.Interpreting.SemanticInterpreter< T >.RewriteRules
| get

Returns the rewrite rules.

The rewrite rules.

Definition at line 463 of file Interpreter.cs.

RewriteRuleCollection<Tree<Symbol> > Mercury.Interpreting.SemanticInterpreter< T >.SemanticRules
| get

Gets the semantic rules (those that only rewrite trees).

The semantic rules.

Definition at line 459 of file Interpreter.cs.

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

- Mercury/Mercury/Interpreting/Interpreter.cs