From d8297fec19292c544a32a474500eca49552215d0 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Mon, 6 Jun 2016 23:00:42 +0200 Subject: LaTeX formatting for derivation trees --- tree.icl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tree.icl') diff --git a/tree.icl b/tree.icl index c7cdc77..f895c89 100644 --- a/tree.icl +++ b/tree.icl @@ -1,6 +1,6 @@ module tree -import StdEnv +import StdEnv, StdDebug import Data.Maybe, Data.List from Data.Func import $ @@ -9,15 +9,18 @@ import System.CommandLine, System.GetOpt import Smurf import SmurfParse +import LaTeX Start w # (_,f,w) = fopen "reverse.smf" FReadText w # (pgm,f) = readFile f # (ok,w) = fclose f w # (Just pgm) = parse [c \\ c <-: pgm] -= toString (devtree pgm) +# tree = devtree pgm +# tree = trace (toString tree +++ "\n") tree += toString (toLaTeX tree) where - devtree pgm = fromJust (tree pgm zero {zero & input = ["reverse"]} listIO) + devtree pgm = fromJust (tree pgm zero { zero & input = [""] } listIO) readFile :: !*File -> *(!String, !*File) readFile f -- cgit v1.2.3