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.IInterpreter< T > Interface Template Reference

Interface for interpreters that create objects from derivation trees according to RewriteRules. More...

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

## Public Member Functions
InterpreterResult< T > | Interpret (Tree< Symbol > tree)
| Uses rewrite rules to create a result value from the tree More...
IReadOnlyList < InterpreterResult< T > > | Interpret (IReadOnlyList< Tree< Symbol >> trees)
| Interprets the list of trees. This is to support memoization and/or parallelisation. More...

## Properties
RewriteRuleCollection< T > | RewriteRules`[get]`
| The collection of rewrite rules used by the interpreter More...

## Detailed Description

Interface for interpreters that create objects from derivation trees according to RewriteRules.

Template Parameters

  T | Interpreter output type.

Type Constraints

  T | : | class |

Definition at line 20 of file Interpreter.cs.

## Member Function Documentation

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

Uses rewrite rules to create a result value from the tree

Parameters

  tree | The derivation tree.

Returns
  Interpretation of the tree or `null` if interpretation failed.

Implemented in Mercury.Interpreting.SemanticInterpreter< T >, and Mercury.Interpreting.Interpreter< T >.

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

Interprets the list of trees. This is to support memoization and/or parallelisation.

Parameters

  trees | The trees.

Returns
  List of results

Implemented in Mercury.Interpreting.SemanticInterpreter< T >, and Mercury.Interpreting.Interpreter< T >.

## Property Documentation

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

The collection of rewrite rules used by the interpreter

Definition at line 23 of file Interpreter.cs.

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

- Mercury/Mercury/Interpreting/Interpreter.cs