Var.py (10963:51f40b101a56) Var.py (11095:12c36d719139)
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.symbols.Symbol import Symbol
29
30class Var(Symbol):
31 def __init__(self, symtab, ident, location, type, code, pairs,
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.symbols.Symbol import Symbol
29
30class Var(Symbol):
31 def __init__(self, symtab, ident, location, type, code, pairs,
32 machine=None, buffer_expr=""):
32 machine=None):
33 super(Var, self).__init__(symtab, ident, location, pairs)
34
33 super(Var, self).__init__(symtab, ident, location, pairs)
34
35 self.buffer_expr = buffer_expr
36 self.machine = machine
37 self.type = type
38 self.code = code
39
40 def __repr__(self):
41 return "[Var id: %s]" % (self.ident)
42
43 def writeCodeFiles(self, path, includes):
44 pass
45
46__all__ = [ "Var" ]
35 self.machine = machine
36 self.type = type
37 self.code = code
38
39 def __repr__(self):
40 return "[Var id: %s]" % (self.ident)
41
42 def writeCodeFiles(self, path, includes):
43 pass
44
45__all__ = [ "Var" ]