2013-03-05 18:16:04 -05:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
from hy.compiler import hy_compile
|
|
|
|
from hy.lex import tokenize
|
|
|
|
import codegen
|
|
|
|
import sys
|
2013-03-05 21:42:54 -05:00
|
|
|
import ast
|
2013-03-05 18:16:04 -05:00
|
|
|
|
2013-03-05 21:42:54 -05:00
|
|
|
tokens = tokenize(open(sys.argv[1], 'r').read())
|
|
|
|
print tokens
|
|
|
|
_ast = hy_compile(tokens)
|
|
|
|
print ast.dump(_ast)
|
|
|
|
print codegen.to_source(_ast)
|