summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Kerneis2014-05-19 17:52:41 +0100
committerGabriel Kerneis2014-05-19 17:52:41 +0100
commit3655519de88664a2819da58aba5c8a3515b2bb48 (patch)
treec472c78b40054c6e91b89b7e5a8573fd42f1903a /src
parentf468e69a5b91c771b8f8bbcbbb55fd8d38c67a66 (diff)
More parser comments (and remove one spurious atomic_)
Diffstat (limited to 'src')
-rw-r--r--src/parser.mly7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/parser.mly b/src/parser.mly
index 76619f59..75cdcf7d 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -367,6 +367,7 @@ app_num_typ:
| Num
{ tloc (ATyp_constant $1) }
+/* XXX this part of the parser makes absolutely no sense to me */
star_typ_list:
| app_num_typ
{ [$1] }
@@ -378,6 +379,8 @@ star_typ:
{ match $1 with
| [] -> assert false
| [t] -> t
+ (* XXX why is ATyp_tup star-separated here, but comma-separated
+ below? *)
| ts -> tloc (ATyp_tup(ts)) }
exp_typ:
@@ -386,7 +389,7 @@ exp_typ:
| TwoStarStar nexp_typ
{ tloc (ATyp_exp($2)) }
-/* this is wrong - for instance, 2** 3 + 5 is parsed as 2** (3+5) */
+/* XXX this is wrong - for instance, 2** 3 + 5 is parsed as 2** (3+5) */
nexp_typ:
| exp_typ
{ $1 }
@@ -937,7 +940,7 @@ fun_def:
{ funloc (FD_function(mk_rec 2,mk_tannot (mk_typqn ()) $3 3 3, mk_eannotn (), $4)) }
| Function_ Rec funcl_ands
{ funloc (FD_function(mk_rec 2, mk_tannotn (), mk_eannotn (), $3)) }
- | Function_ typquant atomic_typ Effect effect_typ funcl_ands
+ | Function_ typquant typ Effect effect_typ funcl_ands
{ funloc (FD_function(mk_recn (), mk_tannot $2 $3 2 3, mk_eannot $5 5, $6)) }
| Function_ typquant typ funcl_ands
{ funloc (FD_function(mk_recn (), mk_tannot $2 $3 2 2, mk_eannotn (), $4)) }