diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-10-15 13:40:49 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-10-15 13:40:49 +0000 |
commit | b7e6df6ff46c2eaad9cd6a0f1f0d21bc0c3b4c61 (patch) | |
tree | ff0c6c4c987cebb81ab50a47287604f2a4e42654 /parsing/g_constrnew.ml4 | |
parent | 270db4c9274496e65c16f16415b819b632a92f0b (diff) |
Mise en conformite return_type en fonction de la doc
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4643 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing/g_constrnew.ml4')
-rw-r--r-- | parsing/g_constrnew.ml4 | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/parsing/g_constrnew.ml4 b/parsing/g_constrnew.ml4 index 9a9cf9a59..6fa833275 100644 --- a/parsing/g_constrnew.ml4 +++ b/parsing/g_constrnew.ml4 @@ -255,7 +255,7 @@ GEXTEND Gram | -> None ] ] ; match_constr: - [ [ "match"; ci=LIST1 case_item SEP ","; ty=case_type; "with"; + [ [ "match"; ci=LIST1 case_item SEP ","; ty=OPT case_type; "with"; br=branches; "end" -> mk_match (loc,ci,ty,br) ] ] ; case_item: @@ -270,11 +270,15 @@ GEXTEND Gram ty = OPT ["in"; t=lconstr -> t] -> (ona,ty) ] ] ; case_type: - [ [ ty = OPT [ "return"; c = operconstr LEVEL "100" -> c ] -> ty ] ] + [ [ "return"; ty = operconstr LEVEL "100" -> ty ] ] ; return_type: - [ [ na = ["as"; id=name -> snd id | -> Names.Anonymous]; - ty = case_type -> (na,ty) ] ] + [ [ a = OPT [ na = ["as"; id=name -> snd id | -> Names.Anonymous]; + ty = case_type -> (na,ty) ] -> + match a with + | None -> Names.Anonymous, None + | Some (na,t) -> (na, Some t) + ] ] ; branches: [ [ OPT"|"; br=LIST0 eqn SEP "|" -> br ] ] |