Please do cvs update if you want to test it.
Notes:
(1) "-xml" command line switch is added. If supplied, the output is in
xml format; if not, the output is in the original text format.
(2) In xml output, the file name is now fully-qualified file name. There
is no change in text format output (i.e. relative file name is used).
(3) The output is send to STDOUT by default. You can use shell redirect
or command line switch "-output" to save the output to a disk file. The
effect of them are exactly the same. [This is the orginal behavior,
there is no change.]
(4) [Still original behavior] This will be a problem for us to extract
metrics automatically (in batch mode). When the script encounters a file
that it cannot parse, it aborts. The problem cannot be solved even if we
use regular expression to specify the name of the files, because a
source code file can contain grammatical error that might lead to
parsing error and abortion of sclc.
There are 2 solutions as far as I can see:
(a) We run sclc for each individual source code file, and send metrics
one file at a time. This way, even if sclc aborts, there is no big deal
and we can continue with the next file. The drawback is the inefficiency
of processing one single file at a time.
(b) Add another command line swith "-continue-on-error", so that files
that cannot be parsed are simply ignored. The drawback is that there are
more changes to the original script, we might end up maintaining our
version of sclc forever.
Cheers,
Cedric