1995-11-09 03:03:37 -08:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Objective Caml *)
|
1995-11-09 03:03:37 -08:00
|
|
|
(* *)
|
|
|
|
(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1995-11-09 03:03:37 -08:00
|
|
|
(* Automatique. Distributed only by permission. *)
|
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
|
|
|
(* $Id$ *)
|
|
|
|
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Conversion of streams and parsers into Objective Caml syntax *)
|
1995-11-09 03:03:37 -08:00
|
|
|
|
|
|
|
open Parsetree
|
|
|
|
|
|
|
|
type stream_pattern_component =
|
1995-11-10 07:14:14 -08:00
|
|
|
Spat_term of pattern * expression option
|
1995-11-09 03:03:37 -08:00
|
|
|
| Spat_nterm of pattern * expression
|
|
|
|
| Spat_sterm of pattern
|
|
|
|
type stream_expr_component =
|
|
|
|
Sexp_term of expression
|
|
|
|
| Sexp_nterm of expression
|
|
|
|
|
|
|
|
val cparser :
|
|
|
|
pattern option *
|
|
|
|
((stream_pattern_component * expression option) list *
|
|
|
|
pattern option *
|
|
|
|
expression) list ->
|
|
|
|
expression
|
|
|
|
val cstream : stream_expr_component list -> expression
|