diff options
| author | Kathy Gray | 2014-02-21 23:09:09 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-02-21 23:09:09 +0000 |
| commit | 80628627e3d1bfc3cfca0d1c676f256e5fcba10b (patch) | |
| tree | d1340eaca97771b3f1cd0e2b60db5ef1e9ea5514 /language/l2.ml | |
| parent | 53146de4b82f90d1b06e9a09c5ec7c5b458fda53 (diff) | |
Add type annotations to lem grammar, including printing out the annotated ast, and extending the interpreter to expect annotations.
Annotations and locations are still not used by the interpreter.
Diffstat (limited to 'language/l2.ml')
| -rw-r--r-- | language/l2.ml | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/language/l2.ml b/language/l2.ml index b01a25ac..1c2a6c09 100644 --- a/language/l2.ml +++ b/language/l2.ml @@ -1,4 +1,4 @@ -(* generated by Ott 0.23 from: l2.ott *) +(* generated by Ott 0.24 from: l2.ott *) type text = string @@ -294,13 +294,13 @@ and 'a lexp_aux = (* lvalue expression *) type -'a effect_opt_aux = (* Optional effect annotation for functions *) +effect_opt_aux = (* Optional effect annotation for functions *) Effect_opt_pure (* sugar for empty effect set *) | Effect_opt_effect of effect type -'a tannot_opt_aux = (* Optional type annotation for functions *) +tannot_opt_aux = (* Optional type annotation for functions *) Typ_annot_opt_some of typquant * typ @@ -328,13 +328,13 @@ type_union_aux = (* Type union constructors *) type -'a effect_opt = - Effect_opt_aux of 'a effect_opt_aux * 'a annot +effect_opt = + Effect_opt_aux of effect_opt_aux * l type -'a tannot_opt = - Typ_annot_opt_aux of 'a tannot_opt_aux * 'a annot +tannot_opt = + Typ_annot_opt_aux of tannot_opt_aux * l type @@ -369,13 +369,13 @@ and index_range = type 'a fundef_aux = (* Function definition *) - FD_function of rec_opt * 'a tannot_opt * 'a effect_opt * ('a funcl) list + FD_function of rec_opt * tannot_opt * effect_opt * ('a funcl) list type 'a scattered_def_aux = (* Function and type union definitions that can be spread across a file. Each one must end in $_$ *) - SD_scattered_function of rec_opt * 'a tannot_opt * 'a effect_opt * id (* scattered function definition header *) + SD_scattered_function of rec_opt * tannot_opt * effect_opt * id (* scattered function definition header *) | SD_scattered_funcl of 'a funcl (* scattered function definition clause *) | SD_scattered_variant of id * name_scm_opt * typquant (* scattered union definition header *) | SD_scattered_unioncl of id * type_union (* scattered union definition member *) |
