comparison python/zcc.py @ 323:e9fe6988497c

Used burg for generating expressions
author Windel Bouwman
date Thu, 30 Jan 2014 19:03:24 +0100
parents 44f336460c2a
children 8f6f3ace4e78
comparison
equal deleted inserted replaced
322:44f336460c2a 323:e9fe6988497c
9 from ppci.irutils import Verifier, Writer 9 from ppci.irutils import Verifier, Writer
10 from ppci.codegen import CodeGenerator 10 from ppci.codegen import CodeGenerator
11 import outstream 11 import outstream
12 from utils import HexFile 12 from utils import HexFile
13 import target 13 import target
14 from target.target_list import target_list
14 from ppci import irutils 15 from ppci import irutils
15 import io 16 import io
16 from ppci.transform import CleanPass, RemoveAddZero 17 from ppci.transform import CleanPass, RemoveAddZero
17 18
18 19
110 print('', file=f) 111 print('', file=f)
111 s += '\n' + f.getvalue() 112 s += '\n' + f.getvalue()
112 return s 113 return s
113 114
114 115
115 targets = {t.name: t for t in target.target_list.target_list} 116 targets = {t.name: t for t in target_list}
116 targetnames = list(targets.keys()) 117 targetnames = list(targets.keys())
117 118
118 # Parse arguments: 119 # Parse arguments:
119 parser = argparse.ArgumentParser(description='lcfos Compiler') 120 parser = argparse.ArgumentParser(description='lcfos Compiler')
120 parser.add_argument('source', type=argparse.FileType('r'), \ 121 parser.add_argument('source', type=argparse.FileType('r'), \