[Synopsis-changes] Synopsis/Synopsis/Synopsis Processor.py,1.5,1.6
Stefan Seefeld stefan at synopsis.fresco.orgMon Nov 17 01:24:14 UTC 2003
- Previous message: [Synopsis-changes] Synopsis/Synopsis/share/Synopsis dump.css,NONE,1.1
- Next message: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Processors XRefCompiler.py,1.6,1.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Update of /cvs/synopsis/Synopsis/Synopsis
In directory frida:/tmp/cvs-serv14505/Synopsis
Modified Files:
Processor.py
Log Message:
add 'input' and 'output' to the parameter list and thus avoid special treatment for them.
Index: Processor.py
===================================================================
RCS file: /cvs/synopsis/Synopsis/Synopsis/Processor.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -d -r1.5 -r1.6
--- Processor.py 16 Nov 2003 15:06:29 -0000 1.5
+++ Processor.py 17 Nov 2003 01:24:11 -0000 1.6
@@ -69,7 +69,7 @@ class Parametrized(object):
if i in self._parameters:
setattr(self, i, kwds[i])
else:
- raise TypeError, "No parameter '%s' in 'Parametrized'"%(i)
+ raise TypeError, "No parameter '%s' in '%s'"%(i, self.__class__.__name__)
class Processor(Parametrized):
@@ -77,18 +77,8 @@ class Processor(Parametrized):
verbose = Parameter(False, "operate verbosely")
debug = Parameter(False, "generate debug traces")
-
- def set_parameters(self, kwds):
- """Sets the given parameters to override the default values.
- Override the Parametrized version so we can handle 'input' and 'output'
- which are not in the _parameters' catalog."""
- for i in kwds:
- if i in self._parameters:
- setattr(self, i, kwds[i])
- elif i == 'input' or i == 'output':
- setattr(self, i, kwds[i]) # these are not in self._parameters but are legal
- else:
- raise TypeError, "No parameter '%s' in processor '%s'"%(i, self.__class__.__name__)
+ input = Parameter([], "input files to process")
+ output = Parameter('', "output file to save the ast to")
def merge_input(self, ast):
"""Join the given ast with a set of asts to be read from 'input' parameter"""
- Previous message: [Synopsis-changes] Synopsis/Synopsis/share/Synopsis dump.css,NONE,1.1
- Next message: [Synopsis-changes] Synopsis/Synopsis/Synopsis/Processors XRefCompiler.py,1.6,1.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Synopsis-changes mailing list