lgen.lua

changeset 2
3975fa5ed630
child 3
b2df1b3f2c83
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lgen.lua	Sat Sep 12 21:27:57 2009 +0300
@@ -0,0 +1,30 @@
+
+module('lgen', package.seeall)
+-- export src dst hierarchy
+
+require('scan')
+require('handlers')
+
+--
+-- Main
+--
+
+if #arg < 2 then
+    error("Usage: lgen src dst")
+end
+
+src = arg[1]
+dst = arg[2]
+
+print('Scan...')
+hierarchy = scan.scan(src)
+
+-- Pitäisi env konstruoida. polun perusteella.
+scan.map(hierarchy, function(f) handlers.choose(f, env) end)
+
+print('Phase 1...')
+scan.map(hierarchy, function(f) handlers.phase1(f, env) end)
+print('Phase 2...')
+scan.map(hierarchy, function(f) handlers.phase2(f, env) end)
+print('Phase 3...')
+scan.map(hierarchy, function(f) handlers.phase3(f, env) end)

mercurial