@@ -0,0 +1,868 @@
+import sys%0Aimport os%0A%0Afrom l20n.compiler.js import Compiler%0Afrom l20n.format.lol.parser import Parser%0A%0Afrom pyjs.serializer import Serializer%0A%0Adef read_file(path):%0A    with file(path) as f:%0A        return f.read()%0A%0Adef get_lol(path):%0A    s = read_file(path)%0A    parser = Parser()%0A    lol = parser.parse(s)%0A    return lol%0A%0A%0Adef compile(path, output=None):%0A    lol = get_lol(path)%0A    compiler = Compiler()%0A    js = compiler.compile(lol)%0A    string = Serializer.dump_program(js)%0A    if output == 'console':%0A        print(string)%0A        return%0A    %0A    if output is None:%0A        output = os.path.splitext(path)%5B0%5D%0A        output = '%25s.%25s' %25 (output, 'j20n')%0A    f = open(output, mode='w')%0A    f.write(string)%0A    f.close()%0A    return%0A%0Aif __name__ == '__main__':%0A    if len(sys.argv) %3E 2:%0A        compile(sys.argv%5B1%5D, sys.argv%5B2%5D)%0A    else:%0A        compile(sys.argv%5B1%5D)%0A

add compiler