diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-10 16:22:26 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-10 16:22:26 -0800 |
commit | cf86532857ba1e199db6ff16541e7242c6225ff0 (patch) | |
tree | e107e443364bd326d791d2c19e126986cf4aa022 /src/mem/slicc/ast/AST.py | |
parent | 1068ca85d0a29bfa71dc6a21a8d6c8888dce4bc3 (diff) | |
download | gem5-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/AST.py')
-rw-r--r-- | src/mem/slicc/ast/AST.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mem/slicc/ast/AST.py b/src/mem/slicc/ast/AST.py index 5b1b124cd..5818448ca 100644 --- a/src/mem/slicc/ast/AST.py +++ b/src/mem/slicc/ast/AST.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.util import PairContainer, Location class AST(PairContainer): @@ -54,7 +52,7 @@ class AST(PairContainer): def embedError(self, message, *args): if args: message = message % args - code = code_formatter() + code = self.slicc.codeFormatter() code(''' cerr << "Runtime Error at ${{self.location}}, Ruby Time: " << g_eventQueue_ptr->getTime() << ": "<< $message << ", PID: " << getpid() << endl; char c; cerr << "press return to continue." << endl; cin.get(c); abort(); |