TaPAS
0.2
|
Interpreter of ARMOISE syntactic trees. More...
Go to the source code of this file.
Functions | |
CCL_DECLARE_EXCEPTION (armoise_interp_exception, exception) | |
Exception raised on static semantics error. | |
void | armoise_interp_definition (armoise_context *context, armoise_tree *tdef, ccl_list *ids) CCL_THROW(armoise_interp_exception) |
Interpretation of the ARMOISE definition tdef and integration to the context context. More... | |
ccl_tree * | armoise_interp_predicate (armoise_context *context, armoise_tree *P) CCL_THROW(armoise_interp_exception) |
Interpretation of the ARMOISE predicate P under the context context. More... | |
Interpreter of ARMOISE syntactic trees.
This module proposes two functions that allows to interpret the syntactic trees of ARMOISE definitions or predicates into data structures defined in armoise.h.
Each function may raise an armoise_interp_exception if the armoise_tree is inconsistent with some parts of the static semantics of ARMOISE.
Definition in file armoise-interp.h.
void armoise_interp_definition | ( | armoise_context * | context, |
armoise_tree * | tdef, | ||
ccl_list * | ids | ||
) |
Interpretation of the ARMOISE definition tdef and integration to the context context.
This function interprets the syntactic tree tdef as a definition or parallel definition of predicates. Each definition is interpreted under context (and its parents). Each newly created predicate is added to context. If ids is not null then identifiers of predicates are stored in this list.
context | the context in which the syntactic tree is interpreted. |
tdef | the syntactic tree of the definition |
ids | the list that receives identifiers of created predicates |
armoise_interp_exception | if the syntactic tree is not consistent with the static semantics of the language. |
ccl_tree* armoise_interp_predicate | ( | armoise_context * | context, |
armoise_tree * | P | ||
) |
Interpretation of the ARMOISE predicate P under the context context.
This function interprets the syntactic tree P as a predicate and return it into a ccl_tree. P is interpreted under context (and its parents.
The function returns a ccl_tree whose leaves are armoise_predicate}s. The structure of the ccl_tree corresponds to the structure of the parallel definition (using <.> construction) of the predicate (s).
context | the context in which the syntactic tree is interpreted. |
P | the syntactic tree of the predicate(s) |
armoise_interp_exception | if the syntactic tree is not consistent with the static semantics of the language. |