MachineAST.py (7542:49327b849c7f) | MachineAST.py (9298:9a087e046c58) |
---|---|
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; --- 62 unchanged lines hidden (view full) --- 71 machine.buildTable() 72 73 # Pop the frame 74 self.symtab.popFrame() 75 76 def findMachines(self): 77 # Add to MachineType enumeration 78 machine_type = self.symtab.find("MachineType", Type) | 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; --- 62 unchanged lines hidden (view full) --- 71 machine.buildTable() 72 73 # Pop the frame 74 self.symtab.popFrame() 75 76 def findMachines(self): 77 # Add to MachineType enumeration 78 machine_type = self.symtab.find("MachineType", Type) |
79 if not machine_type.enumAdd(self.ident, self.pairs_ast.pairs): | 79 if not machine_type.addEnum(self.ident, self.pairs_ast.pairs): |
80 self.error("Duplicate machine name: %s:%s" % (machine_type, 81 self.ident)) 82 83 # Generate code for all the internal decls 84 self.decls.findMachines() | 80 self.error("Duplicate machine name: %s:%s" % (machine_type, 81 self.ident)) 82 83 # Generate code for all the internal decls 84 self.decls.findMachines() |