diff --git a/src/Ophis/Environment.py b/src/Ophis/Environment.py index 533be44..0450262 100644 --- a/src/Ophis/Environment.py +++ b/src/Ophis/Environment.py @@ -9,7 +9,7 @@ import Ophis.Errors as Err -class Environment: +class Environment(object): """Environment class. Controls the various scopes and global abstract execution variables.""" def __init__(self): diff --git a/src/Ophis/Frontend.py b/src/Ophis/Frontend.py index 4313c57..38c03a9 100644 --- a/src/Ophis/Frontend.py +++ b/src/Ophis/Frontend.py @@ -13,7 +13,7 @@ import os # You may use, modify, and distribute this file under the MIT # license: See README for details. -class Lexeme: +class Lexeme(object): "Class for lexer tokens. Used by lexer and parser." def __init__(self, type="UNKNOWN", value=None): self.type = type.upper() @@ -137,7 +137,7 @@ def lex(point, line): add_EOL() return result -class ParseLine: +class ParseLine(object): "Maintains the parse state of a line of code. Enables arbitrary lookahead." def __init__(self, lexemes): self.lexemes = lexemes diff --git a/src/Ophis/IR.py b/src/Ophis/IR.py index 6e017f6..40fe818 100644 --- a/src/Ophis/IR.py +++ b/src/Ophis/IR.py @@ -9,7 +9,7 @@ import Ophis.Errors as Err -class Node: +class Node(object): """The default IR Node Instances of Node always have the three fields ppt(Program Point), nodetype(a string), and data (a list).""" @@ -38,7 +38,7 @@ NullNode = Node("", "None") def SequenceNode(ppt, nodelist): return Node(ppt, "SEQUENCE", *nodelist) -class Expr: +class Expr(object): """Base class for Ophis expressions All expressions have a field called "data" and a boolean field called "hardcoded". An expression is hardcoded if it has no diff --git a/src/Ophis/Passes.py b/src/Ophis/Passes.py index 8565e55..497f37e 100644 --- a/src/Ophis/Passes.py +++ b/src/Ophis/Passes.py @@ -20,7 +20,7 @@ import Ophis.Macro as Macro # The passes themselves -class Pass: +class Pass(object): """Superclass for all assembler passes. Automatically handles IR types that modify the environent's structure, and by default raises an error on anything else. Override visitUnknown in your @@ -67,7 +67,7 @@ class Pass: print>>sys.stderr, "Current IR:" print>>sys.stderr, node -class FixPoint: +class FixPoint(object): """A specialized class that is not a pass but can be run like one. This class takes a list of passes and a "fixpoint" function.""" def __init__(self, name, passes, fixpoint):