From 1482d3c977203fba91a944d9a7ac8c72e5554017 Mon Sep 17 00:00:00 2001 From: natile Date: Tue, 1 Oct 2002 16:57:29 +0000 Subject: [PATCH] contest file --- helm/ocaml/mathql_interpreter/context.ml | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 helm/ocaml/mathql_interpreter/context.ml diff --git a/helm/ocaml/mathql_interpreter/context.ml b/helm/ocaml/mathql_interpreter/context.ml new file mode 100644 index 000000000..c9431d1af --- /dev/null +++ b/helm/ocaml/mathql_interpreter/context.ml @@ -0,0 +1,30 @@ +(* contexts *****************************************************************) + +type svar_context = (MathQL.svar * MathQL.resource_set) list + +type rvar_context = (MathQL.rvar * MathQL.resource) list + +type group_context = (MathQL.rvar * MathQL.attribute_group) list + +type vvar_context = (MathQL.vvar * MathQL.value) list + + +type context = {svars: svar_context; (* contesto delle svar *) + rvars: rvar_context; (* contesto delle rvar *) + groups: group_context; (* contesto dei gruppi *) + vvars: vvar_context (* contesto delle vvar introdotte con let-in *) + } + +let upd_svars c s = + {svars = s; rvars = c.rvars; groups = c.groups; vvars = c.vvars} + +let upd_rvars c s = + {svars = c.svars; rvars = s; groups = c.groups; vvars = c.vvars} + +let upd_groups c s = + {svars = c.svars; rvars = c.rvars; groups = s; vvars = c.vvars} + +let upd_vvars c s = + {svars = c.svars; rvars = c.rvars; groups = c.groups; vvars = s} + + -- 2.39.2