blob: 8321bcd61d503709b2bc86d55ed85e03740e857d [file] [log] [blame]
Marc Slemkodb14e172006-08-09 23:36:18 +00001import sys
2import generator
3import cpp_generator
4import parser
5
6if __name__ == '__main__':
7
8 args = sys.argv[1:]
9
10 generators = []
11
12 debug = False
13
14 if "--cpp" in args:
15 generators.append(cpp_generator.CPPGenerator())
16 args.remove("--cpp")
17 if "--debug" in args:
18 debug = True
19 args.remove("--debug")
20
21 filename = args[-1]
22
23 p = parser.Parser(debug=debug)
24
25 p.parse(filename, False)
26
27 [g(p.program, filename) for g in generators]
28