def main (*args): import pprint handler = MetaASDLHandler() for arg in args: pt = asdl.parse(arg) module = handler.handle(pt) print module.emit_md() for ty in module._types: print ty.emit_md() print print "\n".join(pgen2LL1.gen_code_lines(module.emit_code()))
def main (*args): global __DEBUG__ from basil.thirdparty import asdl import pprint esc_handler = EscASDLHandler() for arg in args: if arg == "-d": __DEBUG__ = True elif arg == "-v": esc_handler = EscASDLHandler(True) else: pt = asdl.parse(arg) esc_pt = esc_handler.handle(pt) pprint.pprint(esc_pt) print