summaryrefslogtreecommitdiff
path: root/language/l2.ml
diff options
context:
space:
mode:
authorKathy Gray2015-03-26 10:36:42 +0000
committerKathy Gray2015-03-26 10:36:42 +0000
commitb20c779892ba38df11bd4c6f6507ad5296b6ab7d (patch)
tree7fa3df7d0fb5555c8b48bd4fde2f347d11b38662 /language/l2.ml
parent910ffcef82bb984cf08b04a1cb66bed514df711e (diff)
Add subtraction to nexp grammar (removing the need to do a + (-1 * b))
Fix up parsing on 2** precedence Fix errors on type variables in function definition
Diffstat (limited to 'language/l2.ml')
-rw-r--r--language/l2.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/language/l2.ml b/language/l2.ml
index dc96020d..d4423c54 100644
--- a/language/l2.ml
+++ b/language/l2.ml
@@ -45,8 +45,9 @@ nexp_aux = (* expression of kind Nat, for vector sizes and origins *)
| Nexp_constant of int (* constant *)
| Nexp_times of nexp * nexp (* product *)
| Nexp_sum of nexp * nexp (* sum *)
+ | Nexp_minus of nexp * nexp (* subtraction, error for nexp1 to be smaller than nexp2 *)
| Nexp_exp of nexp (* exponential *)
- | Nexp_neg of nexp (* For internal use. Not M as a dataconstructor is required *)
+ | Nexp_neg of nexp (* For internal use *)
and nexp =
Nexp_aux of nexp_aux * l