MachineAST.py (6657:ef5fae93a3b2) | MachineAST.py (6714:028047200ff7) |
---|---|
1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 26 unchanged lines hidden (view full) --- 35 self.ident = ident 36 self.pairs_ast = pairs_ast 37 self.config_parameters = config_parameters 38 self.decls = decls 39 40 def __repr__(self): 41 return "[Machine: %r]" % self.ident 42 | 1# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 2# Copyright (c) 2009 The Hewlett-Packard Development Company 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 26 unchanged lines hidden (view full) --- 35 self.ident = ident 36 self.pairs_ast = pairs_ast 37 self.config_parameters = config_parameters 38 self.decls = decls 39 40 def __repr__(self): 41 return "[Machine: %r]" % self.ident 42 |
43 def files(self, hh, cc, parent=None): 44 hh.add('%s_Controller.hh' % self.ident) 45 hh.add('%s_Profiler.hh' % self.ident) | 43 def files(self, parent=None): 44 s = set(('%s_Controller.cc' % self.ident, 45 '%s_Controller.hh' % self.ident, 46 '%s_Profiler.cc' % self.ident, 47 '%s_Profiler.hh' % self.ident, 48 '%s_Transitions.cc' % self.ident, 49 '%s_Wakeup.cc' % self.ident)) |
46 | 50 |
47 cc.add('%s_Controller.cc' % self.ident) 48 cc.add('%s_Profiler.cc' % self.ident) 49 cc.add('%s_Transitions.cc' % self.ident) 50 cc.add('%s_Wakeup.cc' % self.ident) | 51 s |= self.decls.files(self.ident) 52 return s |
51 | 53 |
52 self.decls.files(hh, cc, self.ident) 53 | |
54 def generate(self): 55 # Make a new frame 56 self.symtab.pushFrame() 57 58 # Create a new machine 59 machine = StateMachine(self.symtab, self.ident, self.location, 60 self.pairs, self.config_parameters) 61 --- 20 unchanged lines hidden --- | 54 def generate(self): 55 # Make a new frame 56 self.symtab.pushFrame() 57 58 # Create a new machine 59 machine = StateMachine(self.symtab, self.ident, self.location, 60 self.pairs, self.config_parameters) 61 --- 20 unchanged lines hidden --- |