Marina/MarinaTest.java: a few hacks to get the silicon working
[fleet.git] / contrib / f0 / Main.lhs
1 \begin{code}
2
3 {-
4  next step:
5
6   - Transform code involving standing moves into two sequential
7     blocks: setup and teardown.  Then establish proper sequencing
8     between them.  The teardown block consists only of kills.
9
10   - Implement sequencing.
11 -}
12
13 module Main
14 where
15 import SBP
16 import Types
17 import Util
18 import Fleet
19 import Compile
20
21 main = do t <- parseFile "src/edu/berkeley/fleet/f0/f0.g" "contrib/demo.f0"
22           putStrLn ""
23           putStrLn $ show $ coalesceFlatHeadlessNodes t
24           putStrLn ""
25           putStrLn $ join "\n\n" $ map show $ ((fromTree $ coalesceFlatHeadlessNodes t) :: [Def])
26           putStrLn ""
27           compiled <- return $ join "\n\n" $ map compileDef $ ((fromTree $ coalesceFlatHeadlessNodes t) :: [Def])
28           putStrLn $ compiled
29           writeFile "compiled.fleet" ("// compiled with f0\n\n"++compiled++"\n")
30           putStrLn ""
31
32 \end{code}
33
34
35
36