lgen.lua

Sat, 12 Sep 2009 21:27:57 +0300

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 12 Sep 2009 21:27:57 +0300
changeset 2
3975fa5ed630
child 3
b2df1b3f2c83
permissions
-rw-r--r--

(don't know)


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