1 (**************************************************************************)
5 (* François Pottier, INRIA Rocquencourt *)
6 (* Yann Régis-Gianas, PPS, Université Paris Diderot *)
8 (* Copyright 2005-2008 Institut National de Recherche en Informatique *)
9 (* et en Automatique. All rights reserved. This file is distributed *)
10 (* under the terms of the Q Public License version 1.0, with the change *)
11 (* described in file LICENSE. *)
13 (**************************************************************************)
17 (* Concrete syntax trees. *)
19 (* A concrete syntax tree is one of a leaf -- which corresponds to a
20 terminal symbol; a node -- which corresponds to a non-terminal
21 symbol, and whose immediate descendants form an expansion of that
22 symbol; or an error leaf -- which corresponds to a point where the
23 [error] pseudo-token was shifted. *)
26 | CstTerminal
of Terminal.t
27 | CstNonTerminal
of Production.index
* cst array
30 (* This is a (mostly) unambiguous printer for concrete syntax trees,
31 in an sexp-like notation. *)
33 val print
: out_channel
-> cst
-> unit
35 (* This is a pretty-printer for concrete syntax trees. The notation is
36 the same as that used by the above printer; the only difference is
37 that the [Pprint] library is used to manage indentation. *)
39 val show
: out_channel
-> cst
-> unit