summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>2001-10-02 14:14:53 +0000
committerDaniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>2001-10-02 14:14:53 +0000
commit12c98272ce5becbcc9c3dcd7f2db196d71be3c86 (patch)
tree0996830ed44c656a5fbbb0ed387a0d69bd928e0f
parentc64ae7844aaea340e7299ebcee9267e5167be257 (diff)
-
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3832 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--camlp4/etc/pa_o.ml2
-rw-r--r--camlp4/etc/pa_olabl.ml2
-rw-r--r--camlp4/meta/pa_r.ml7
-rw-r--r--camlp4/meta/q_MLast.ml7
-rw-r--r--camlp4/ocaml_src/meta/pa_r.ml17
-rw-r--r--camlp4/ocaml_src/meta/q_MLast.ml16
6 files changed, 11 insertions, 40 deletions
diff --git a/camlp4/etc/pa_o.ml b/camlp4/etc/pa_o.ml
index de157dbf1..2359cccf7 100644
--- a/camlp4/etc/pa_o.ml
+++ b/camlp4/etc/pa_o.ml
@@ -933,7 +933,7 @@ EXTEND
| "simple"
[ "["; ct = ctyp; ","; ctcl = LIST1 ctyp SEP ","; "]";
ci = class_longident ->
- <:class_expr< $list:ci$ [ $ct$ , $list:ctcl$ ] >>
+ <:class_expr< $list:ci$ [ $list:[ct :: ctcl]$ ] >>
| "["; ct = ctyp; "]"; ci = class_longident ->
<:class_expr< $list:ci$ [ $ct$ ] >>
| ci = class_longident -> <:class_expr< $list:ci$ >>
diff --git a/camlp4/etc/pa_olabl.ml b/camlp4/etc/pa_olabl.ml
index 0d3259ec7..e235b6de6 100644
--- a/camlp4/etc/pa_olabl.ml
+++ b/camlp4/etc/pa_olabl.ml
@@ -1471,7 +1471,7 @@ EXTEND
| "simple"
[ "["; ct = ctyp; ","; ctcl = LIST1 ctyp SEP ","; "]";
ci = class_longident ->
- <:class_expr< $list:ci$ [ $ct$ , $list:ctcl$ ] >>
+ <:class_expr< $list:ci$ [ $list:[ct :: ctcl]$ ] >>
| "["; ct = ctyp; "]"; ci = class_longident ->
<:class_expr< $list:ci$ [ $ct$ ] >>
| ci = class_longident -> <:class_expr< $list:ci$ >>
diff --git a/camlp4/meta/pa_r.ml b/camlp4/meta/pa_r.ml
index 2037f3800..7743797d0 100644
--- a/camlp4/meta/pa_r.ml
+++ b/camlp4/meta/pa_r.ml
@@ -610,11 +610,8 @@ EXTEND
[ ce = SELF; sel = LIST1 expr LEVEL "simple" ->
<:class_expr< $ce$ $list:sel$ >> ]
| "simple"
- [ ci = class_longident; "["; ct = ctyp; ","; ctcl = LIST1 ctyp SEP ",";
- "]" ->
- <:class_expr< $list:ci$ [ $ct$ , $list:ctcl$ ] >>
- | ci = class_longident; "["; ct = ctyp; "]" ->
- <:class_expr< $list:ci$ [ $ct$ ] >>
+ [ ci = class_longident; "["; ctcl = LIST0 ctyp SEP ","; "]" ->
+ <:class_expr< $list:ci$ [ $list:ctcl$ ] >>
| ci = class_longident -> <:class_expr< $list:ci$ >>
| "object"; cspo = OPT class_self_patt; cf = class_structure; "end" ->
<:class_expr< object $cspo$ $list:cf$ end >>
diff --git a/camlp4/meta/q_MLast.ml b/camlp4/meta/q_MLast.ml
index 6479d503d..0dfceeebd 100644
--- a/camlp4/meta/q_MLast.ml
+++ b/camlp4/meta/q_MLast.ml
@@ -668,11 +668,8 @@ EXTEND
Node "CeApp" [ce; sel] ]
| "simple"
[ a = anti_ -> a
- | ci = class_longident; "["; ct = ctyp; ","; ctcl = SLIST1 ctyp SEP ",";
- "]" ->
- Node "CeCon" [ci; Cons ct ctcl]
- | ci = class_longident; "["; ct = ctyp; "]" ->
- Node "CeCon" [ci; List [ct]]
+ | ci = class_longident; "["; ctcl = SLIST1 ctyp SEP ","; "]" ->
+ Node "CeCon" [ci; ctcl]
| ci = class_longident -> Node "CeCon" [ci; List []]
| "object"; csp = class_self_patt_opt; cf = class_structure; "end" ->
Node "CeStr" [csp; cf]
diff --git a/camlp4/ocaml_src/meta/pa_r.ml b/camlp4/ocaml_src/meta/pa_r.ml
index 18feea973..c9650e06f 100644
--- a/camlp4/ocaml_src/meta/pa_r.ml
+++ b/camlp4/ocaml_src/meta/pa_r.ml
@@ -1764,25 +1764,14 @@ Grammar.extend
(Grammar.Entry.obj
(class_longident : 'class_longident Grammar.Entry.e));
Gramext.Stoken ("", "[");
- Gramext.Snterm (Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e));
- Gramext.Stoken ("", "]")],
- Gramext.action
- (fun _ (ct : 'ctyp) _ (ci : 'class_longident) (loc : int * int) ->
- (MLast.CeCon (loc, ci, [ct]) : 'class_expr));
- [Gramext.Snterm
- (Grammar.Entry.obj
- (class_longident : 'class_longident Grammar.Entry.e));
- Gramext.Stoken ("", "[");
- Gramext.Snterm (Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e));
- Gramext.Stoken ("", ",");
- Gramext.Slist1sep
+ Gramext.Slist0sep
(Gramext.Snterm (Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e)),
Gramext.Stoken ("", ","));
Gramext.Stoken ("", "]")],
Gramext.action
- (fun _ (ctcl : 'ctyp list) _ (ct : 'ctyp) _ (ci : 'class_longident)
+ (fun _ (ctcl : 'ctyp list) _ (ci : 'class_longident)
(loc : int * int) ->
- (MLast.CeCon (loc, ci, (ct :: ctcl)) : 'class_expr))]];
+ (MLast.CeCon (loc, ci, ctcl) : 'class_expr))]];
Grammar.Entry.obj (class_structure : 'class_structure Grammar.Entry.e),
None,
[None, None,
diff --git a/camlp4/ocaml_src/meta/q_MLast.ml b/camlp4/ocaml_src/meta/q_MLast.ml
index b013dc72b..7ef2e2e0b 100644
--- a/camlp4/ocaml_src/meta/q_MLast.ml
+++ b/camlp4/ocaml_src/meta/q_MLast.ml
@@ -2569,17 +2569,6 @@ Grammar.extend
(Grammar.Entry.obj
(class_longident : 'class_longident Grammar.Entry.e));
Gramext.Stoken ("", "[");
- Gramext.Snterm (Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e));
- Gramext.Stoken ("", "]")],
- Gramext.action
- (fun _ (ct : 'ctyp) _ (ci : 'class_longident) (loc : int * int) ->
- (Node ("CeCon", [ci; List [ct]]) : 'class_expr));
- [Gramext.Snterm
- (Grammar.Entry.obj
- (class_longident : 'class_longident Grammar.Entry.e));
- Gramext.Stoken ("", "[");
- Gramext.Snterm (Grammar.Entry.obj (ctyp : 'ctyp Grammar.Entry.e));
- Gramext.Stoken ("", ",");
Gramext.srules
[[Gramext.Slist1sep
(Gramext.Snterm
@@ -2593,9 +2582,8 @@ Grammar.extend
(fun (a : 'anti_list) (loc : int * int) -> (a : 'anti))];
Gramext.Stoken ("", "]")],
Gramext.action
- (fun _ (ctcl : ast) _ (ct : 'ctyp) _ (ci : 'class_longident)
- (loc : int * int) ->
- (Node ("CeCon", [ci; Cons (ct, ctcl)]) : 'class_expr));
+ (fun _ (ctcl : ast) _ (ci : 'class_longident) (loc : int * int) ->
+ (Node ("CeCon", [ci; ctcl]) : 'class_expr));
[Gramext.Snterm (Grammar.Entry.obj (anti_ : 'anti_ Grammar.Entry.e))],
Gramext.action
(fun (a : 'anti_) (loc : int * int) -> (a : 'class_expr))]];