Seems to work
[rops.git] / back.sh
blobc5136129d55bbc21ef7a036a3eb71be0092105e2
1 #!/bin/bash
2 ast=`cat /dev/stdin`
4 ocaml -noprompt <<EOF | tee back.out | sed -n '/- : Types.scheme_object =/,$ p' | sed -e 's/.*Types.scheme_object.*= //'
5 open Types;;
6 open Evaluator;;
7 open Environment;;
8 #load "types.cmo";;
9 #load "environment.cmo";;
10 #load "evaluator.cmo";;
12 let eval1 obj =
13 Evaluator.eval Environment.initial_env obj (fun o -> o);;
15 eval1 ($ast);;
16 exit 0;;
17 EOF