[Wisp-cvs] wisp/users/dig tran.py,1.66,1.67
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-05-13 18:19:19
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv8126 Modified Files: tran.py Log Message: inlined mainloop into main Index: tran.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran.py,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- tran.py 22 Apr 2003 17:34:09 -0000 1.66 +++ tran.py 13 May 2003 18:15:53 -0000 1.67 @@ -274,13 +274,6 @@ State = outer_state Registers = {Generic_Register: 'reg'} # for reverse translation -def mainloop (): - tok = prep.get_token() - while tok <> None: - if verbose: print '(%s) %s' % (' '.join(map(str, Regstack)), tok) - State(tok) - tok = prep.get_token() - verbose = 0 def main (): @@ -305,7 +298,11 @@ if len(args) != 1: raise 'Invalid argument count -- must be 1', args prep = Preprocessor(args[0]) - mainloop() + tok = prep.get_token() + while tok <> None: + if verbose: print '(%s) %s' % (' '.join(map(str, Regstack)), tok) + State(tok) + tok = prep.get_token() print 'TEXT'; Text.dump() print 'DATA'; Data.dump() print 'BSS'; Bss.dump() |