summaryrefslogtreecommitdiff
path: root/src/mem/slicc/ast/ActionDeclAST.py
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-10 16:22:26 -0800
committerNathan Binkert <nate@binkert.org>2010-03-10 16:22:26 -0800
commitcf86532857ba1e199db6ff16541e7242c6225ff0 (patch)
treee107e443364bd326d791d2c19e126986cf4aa022 /src/mem/slicc/ast/ActionDeclAST.py
parent1068ca85d0a29bfa71dc6a21a8d6c8888dce4bc3 (diff)
downloadgem5-cf86532857ba1e199db6ff16541e7242c6225ff0.tar.xz
slicc: have a central mechanism for creating a code_formatter.
This makes it easier to add global variables like protocol
Diffstat (limited to 'src/mem/slicc/ast/ActionDeclAST.py')
-rw-r--r--src/mem/slicc/ast/ActionDeclAST.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mem/slicc/ast/ActionDeclAST.py b/src/mem/slicc/ast/ActionDeclAST.py
index 18bf443b9..e85aa25b8 100644
--- a/src/mem/slicc/ast/ActionDeclAST.py
+++ b/src/mem/slicc/ast/ActionDeclAST.py
@@ -25,8 +25,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from m5.util import code_formatter
-
from slicc.ast.DeclAST import DeclAST
from slicc.symbols import Action, Type, Var
@@ -55,7 +53,7 @@ class ActionDeclAST(DeclAST):
self.symtab.newSymbol(var)
# Do not allows returns in actions
- code = code_formatter()
+ code = self.slicc.codeFormatter()
self.statement_list.generate(code, None)
self.pairs["c_code"] = str(code)