Home
News
Download
Docs
Bugs
unassigned
unresolved
search
Contact
Tasks
Code
Name Password
register
Lost login?
The C parser fails with a Segmentation Fault when called on an empty file: $ touch empty.c $ synopsis -p C -f HTML -o html_C empty.c The attached patch handles this case.
There are really two issues: * The C (and Cxx) parsers need to deal with an empty input. That's what your patch addresses, and that happens to be already in the current code. * The preprocessor didn't use to handle errors. That I just fixed, i.e. a failure in the Cpp parser will raise a 'Processor.Error' now.
Current trunk throws an (IMO invalid) error for empty C and Cxx files: $ > empty.cc $ synopsis -p C -o empty.C.syn empty.cc Error: ParseError: The input contains errors. $ synopsis -p Cxx -o empty.Cxx.syn empty.cc terminate called after throwing an instance of 'std::runtime_error' what(): The input contains errors. Aborted