cyclus/cyclus — pull request #796 by scopatz (2014-04-01 23:12:06+00:00)
Title: fixed cycpp for python 2.7.3

Hopefully this will also fix the Python 3 issues that @rwcarlsen was experiencing. This PR will need to be merged before CI can be brought back up. After CI is back, the moratorium will be lifted and we can proceed with development normally. Because this blocks all future development, please review post-haste.

Here is what went wrong. I moved the comments to become first-class statements in the top level `RE_STATEMENT` regex. However many of the filter regexes still were prefixed to ignore comments. This caused problems if the statement *was* a comment. In Python 2.7.3, the `re.match()` call would start to match because the comment starts as a comment. However, since the ending separator didn't exist in the string, the regex would continue to try to match forever and ever. This would eat up memory until the process died. In Python 2.7.4 and higher, regex would notice that the end of the string was reached and it would correctly report that no match was found.

The fix for this issue was to remove the comment prefixes from the regexes on the filters. Everything proceeded hunky dory after that.