path: root/
diff options
Diffstat (limited to '')
1 files changed, 9 insertions, 14 deletions
diff --git a/ b/
index b24812a..61ffa74 100644
--- a/
+++ b/
@@ -1,28 +1,23 @@
#!/usr/bin/env python
"""Compiles C into assembly for the practicum processor (PP2)
-All rights reserved, you may not redistribute or use this program without prior
-permission from Peter Wu or Xander Houtman. Use of this program is entirely
-your own risk. In no circumstances can the authors of this program be held
-responsible for any damage including, but not limited to, financial damage or
-data loss. Modification of this program is not allowed without prior
-permission. The generated output (assembly and messages) are not subject to
-this license.
+Copyright (C) 2011-2014 Peter Wu <>
+Licensed under the MIT license <>.
__author__ = "Peter Wu"
-__copyright__ = "Copyright 2011, Peter Wu"
+__copyright__ = "Copyright (C) 2011-2014 Peter Wu"
__credits__ = ["Peter Wu"]
-__license__ = "Proprietary"
+__license__ = "MIT"
__version__ = "1.0"
__maintainer__ = "Peter Wu"
-__email__ = ""
+__email__ = ""
class LinkedNode(object):
"""Stores nodes with a reference to the parent"""
def __init__(self, node, parent=None, level_increment=False):
"""Holds properties for a node
Keyword arguments:
node -- a Node object which is an object from the c_ast class
parent -- a parent LinkedNode object
@@ -109,14 +104,14 @@ class LinkedNode(object):
return "Unknown"
def setBreak(self, break_label):
"""Marks this node as a loop or switch by setting the label for break
Keywords arguments:
break_label -- The label to continue when using the break keyword
self.break_label = break_label
def setContinue(self, continue_label):
"""Marks this node as a loop by setting the label for continue
Keywords arguments:
continue_label -- The label to continue when using the continue keyword
@@ -138,7 +133,7 @@ class LinkedNode(object):
return None
def setLabel(self, label_name, label_asm):
"""Sets the label for this node
Keyword arguments:
label_name -- The label name as can be used in C
label_asm -- The label as it appears in assembly