|
Mercury library
1.0
Translation of CFG grammars into an object model (Bachelor's thesis).
|
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...
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... | |
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.
| T | Interpreter output type. |
| T | : | class |
Definition at line 431 of file Interpreter.cs.
| Mercury.Interpreting.SemanticInterpreter< T >.SemanticInterpreter | ( | IInterpreter< Tree< Symbol >> | semintr, |
| IInterpreter< T > | finintr | ||
| ) |
Initializes a new instance of the SemanticInterpreter{T} class.
| semintr | The semantic interpreter. |
| finintr | The actual interpreter. |
| System.ArgumentNullException | When either of parameters is null. |
Definition at line 445 of file Interpreter.cs.
Interprets the tree using rewrite rules.
| tree | The tree to interpret. |
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).
| trees | List of trees |
Implements Mercury.Interpreting.IInterpreter< T >.
Definition at line 496 of file Interpreter.cs.
|
get |
|
get |
Gets the semantic rules (those that only rewrite trees).
The semantic rules.
Definition at line 459 of file Interpreter.cs.
1.8.7