Got rid of previous stuff and just imported mcc.
[shack.git] / mcc-0.5.4rta03 / front / unlam / unlam_ast_util.ml
blob8a4638e548698fb223e0ee768838652e43786621
1 (* AST utilities for unlambda
2 * Geoffrey Irving
3 * $Id: unlam_ast_util.ml,v 1.2 2001/08/17 04:06:15 irving Exp $ *)
5 open Unlam_ast
7 let rec output_exp out e =
8 let oc = output_char out in
9 let oe = output_exp out in
10 match e with
11 Apply (e1, e2) ->
12 oc '`'; oe e1; oe e2
13 | K -> oc 'k'
14 | S -> oc 's'
15 | I -> oc 'i'
16 | V -> oc 'v'
17 | C -> oc 'c'
18 | Y -> oc 'y'
19 | D -> oc 'd'
20 | E -> oc 'e'
21 | At -> oc '@'
22 | Pipe -> oc '|'
23 | Slash -> oc '/'
24 | Dot c -> oc '.'; oc c
25 | Ask c -> oc '?'; oc c
27 let print_exp = output_exp stdout