ObjDeclAST.py (10307:6df951dcd7d9) | ObjDeclAST.py (10308:8c0870dbae5c) |
---|---|
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; --- 15 unchanged lines hidden (view full) --- 24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 28from slicc.ast.DeclAST import DeclAST 29from slicc.symbols import Var 30 31class ObjDeclAST(DeclAST): | 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; --- 15 unchanged lines hidden (view full) --- 24# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 28from slicc.ast.DeclAST import DeclAST 29from slicc.symbols import Var 30 31class ObjDeclAST(DeclAST): |
32 def __init__(self, slicc, type_ast, ident, pairs, rvalue): | 32 def __init__(self, slicc, type_ast, ident, pairs, rvalue, pointer): |
33 super(ObjDeclAST, self).__init__(slicc, pairs) 34 35 self.type_ast = type_ast 36 self.ident = ident 37 self.rvalue = rvalue | 33 super(ObjDeclAST, self).__init__(slicc, pairs) 34 35 self.type_ast = type_ast 36 self.ident = ident 37 self.rvalue = rvalue |
38 self.pointer = pointer |
|
38 39 def __repr__(self): 40 return "[ObjDecl: %r]" % self.ident 41 42 def generate(self, parent = None): 43 if "network" in self and not ("virtual_network" in self or 44 "physical_network" in self) : 45 self.error("Network queues require a 'virtual_network' attribute") --- 53 unchanged lines hidden --- | 39 40 def __repr__(self): 41 return "[ObjDecl: %r]" % self.ident 42 43 def generate(self, parent = None): 44 if "network" in self and not ("virtual_network" in self or 45 "physical_network" in self) : 46 self.error("Network queues require a 'virtual_network' attribute") --- 53 unchanged lines hidden --- |