2001-09-07 01:13:05 -07:00
|
|
|
(* camlp4r pa_extend.cmo q_MLast.cmo *)
|
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* Camlp4 *)
|
|
|
|
(* *)
|
|
|
|
(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 2001 Institut National de Recherche en Informatique et *)
|
|
|
|
(* Automatique. Distributed only by permission. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
|
|
|
open Pa_extend;
|
|
|
|
|
|
|
|
EXTEND
|
|
|
|
symbol: LEVEL "top"
|
|
|
|
[ NONA
|
|
|
|
[ min = [ UIDENT "SLIST0" -> False | UIDENT "SLIST1" -> True ];
|
|
|
|
s = SELF; sep = OPT [ UIDENT "SEP"; t = symbol -> t ] ->
|
|
|
|
let used =
|
|
|
|
match sep with
|
2002-01-25 20:24:54 -08:00
|
|
|
[ Some symb -> symb.used @ s.used
|
2001-09-07 01:13:05 -07:00
|
|
|
| None -> s.used ]
|
|
|
|
in
|
2002-01-25 20:24:54 -08:00
|
|
|
let used = [mk_name loc <:expr< a_list >> :: used] in
|
2002-01-25 09:15:05 -08:00
|
|
|
{used = used; text = sslist loc min sep s;
|
2002-01-26 04:13:05 -08:00
|
|
|
styp = STquo loc "a_list"}
|
2002-01-25 20:24:54 -08:00
|
|
|
| UIDENT "SOPT"; s = SELF ->
|
|
|
|
let used = [mk_name loc <:expr< a_opt >> :: s.used] in
|
2002-01-26 04:13:05 -08:00
|
|
|
{used = used; text = ssopt loc s; styp = STquo loc "a_opt"} ] ]
|
2001-09-07 01:13:05 -07:00
|
|
|
;
|
|
|
|
END;
|