35c35
< usage="%prog [options] <files> ... "
---
> usage="%prog [options] <slicc file> ... "
41a42,47
> help_details = '''This is intended to be used to process slicc files as a
> standalone script. This script assumes that it is running in a directory under
> gem5/ (e.g., gem5/temp). It takes a single argument: The path to a *.slicc
> file. By default it generates the C++ code in the directory generated/. This
> script can also generate the html SLICC output. See src/mem/slicc/main.py for
> more details.'''
55a62
> epilog=help_details,
63c70
< parser.add_option("-F", "--print-files",
---
> parser.add_option("-F", "--print-files", action='store_true',
74a82,87
> slicc_file = files[0]
> if not slicc_file.endswith('.slicc'):
> print("Must specify a .slicc file with a list of state machine files")
> parser.print_help()
> sys.exit(2)
>
80c93,95
< slicc = SLICC(files[0], verbose=True, debug=opts.debug, traceback=opts.tb)
---
> protocol_base = os.path.join(os.path.dirname(__file__), '..', 'protocol')
> slicc = SLICC(slicc_file, protocol_base, verbose=True, debug=opts.debug,
> traceback=opts.tb)
81a97
>
89,91d104
< output("Writing C++ files...")
< slicc.writeCodeFiles(opts.code_path)
<
95a109,112
> output("Writing C++ files...")
> slicc.writeCodeFiles(opts.code_path, [])
>
>