summaryrefslogtreecommitdiff
path: root/language
diff options
context:
space:
mode:
authorKathy Gray2013-10-09 15:36:10 +0100
committerKathy Gray2013-10-09 15:36:10 +0100
commitcaed2d0e87df23cf18e2b332066e146b2e40f53d (patch)
treeab9d1076e0f5dd388fc858823a3b6c86a2084d89 /language
parentf4d8784a03abeeca6e06f906604944dfa88d6686 (diff)
Adding memory writes. Cleaning up the let in the ott file to reflect what actually parses
Diffstat (limited to 'language')
-rw-r--r--language/l2.lem1
-rw-r--r--language/l2.ml1
-rw-r--r--language/l2.ott3
3 files changed, 4 insertions, 1 deletions
diff --git a/language/l2.lem b/language/l2.lem
index 51831898..20d5c7b7 100644
--- a/language/l2.lem
+++ b/language/l2.lem
@@ -188,6 +188,7 @@ and exp = (* Expression *)
and lexp = (* lvalue expression *)
| LEXP_id of id (* identifier *)
+ | LEXP_memory of id * exp (* memory write via function call *)
| LEXP_vector of lexp * exp (* vector element *)
| LEXP_vector_range of lexp * exp * exp (* subvector *)
| LEXP_field of lexp * id (* struct field *)
diff --git a/language/l2.ml b/language/l2.ml
index bf5ecf31..786d04ab 100644
--- a/language/l2.ml
+++ b/language/l2.ml
@@ -248,6 +248,7 @@ and 'a exp =
and 'a lexp_aux = (* lvalue expression *)
LEXP_id of id (* identifier *)
+ | LEXP_memory of id * 'a exp (* memory write via function call *)
| LEXP_vector of 'a lexp * 'a exp (* vector element *)
| LEXP_vector_range of 'a lexp * 'a exp * 'a exp (* subvector *)
| LEXP_field of 'a lexp * id (* struct field *)
diff --git a/language/l2.ott b/language/l2.ott
index 198e6e7a..3b1e95b7 100644
--- a/language/l2.ott
+++ b/language/l2.ott
@@ -820,8 +820,9 @@ fundef :: 'FD_' ::=
letbind :: 'LB_' ::=
{{ com Let binding }}
{{ aux _ annot }} {{ auxparam 'a }}
- | typschm pat = exp :: :: val_explicit
+ | let typschm pat = exp :: :: val_explicit
{{ com value binding, explicit type ([[pat]] must be total)}}
+% at the moment, we cannot parse the following, so perhaps we shouldn't keep this form here
| let pat = exp :: :: val_implicit
{{ com value binding, implicit type ([[pat]] must be total)}}