Trick parsing comments improperly

When I split the comment remover into 2 regular expressions I reversed
the order removing C style comments before c++.  This caused this error
where a /* in a C++ comment made Trick look for the end of the C style
comment and it may never find the end.

refs #178
This commit is contained in:
Alex Lin 2016-02-05 11:19:53 -06:00
parent 6461b50d7d
commit 2b30a92342

View File

@ -219,8 +219,8 @@ sub process_file() {
# remove all comments, they can cause all kinds of trouble
# leave the line continuation character if present
$raw_contents =~ s/\/\*(?:.*?)\*\/(\s*\\\n)?/$1/sg ;
$raw_contents =~ s/\/\/(?:.*?)(\\)?(\n)/$1\n/sg ;
$raw_contents =~ s/\/\*(?:.*?)\*\/(\s*\\\n)?/$1/sg ;
## The init_attr functions cause problems when we try and wrap them with SWIG.
## We can safely remove them from the header files.