summaryrefslogtreecommitdiff
path: root/src/mem/slicc/main.py
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2011-07-05 18:30:05 -0700
committerNathan Binkert <nate@binkert.org>2011-07-05 18:30:05 -0700
commitda1eaaca0ec7f65525dd2706f4b6b207bf9ee691 (patch)
treea31cf8470838a496894cfb9fb74b806895dfa555 /src/mem/slicc/main.py
parent831e9b3b7a658663f5bffafef175d4f4a5615cfd (diff)
downloadgem5-da1eaaca0ec7f65525dd2706f4b6b207bf9ee691.tar.xz
slicc: add a protocol statement and an include statement
All protocols must specify their name The include statement allows any file to include another file.
Diffstat (limited to 'src/mem/slicc/main.py')
-rw-r--r--src/mem/slicc/main.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mem/slicc/main.py b/src/mem/slicc/main.py
index 15eb9d4be..0b528d805 100644
--- a/src/mem/slicc/main.py
+++ b/src/mem/slicc/main.py
@@ -66,7 +66,7 @@ def main(args=None):
help="don't print messages")
opts,files = parser.parse_args(args=args)
- if len(files) < 1:
+ if len(files) != 1:
parser.print_help()
sys.exit(2)
@@ -75,8 +75,7 @@ def main(args=None):
output("SLICC v0.4")
output("Parsing...")
- slicc = SLICC(debug=opts.debug)
- slicc.load(files)
+ slicc = SLICC(files[0], verbose=True, debug=opts.debug, traceback=opts.tb)
if opts.print_files:
for i in sorted(slicc.files()):