]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix regexp recognizing comments to cope with unterminated comments.
authorGuido van Rossum <guido@python.org>
Fri, 5 Jun 1992 15:13:53 +0000 (15:13 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 5 Jun 1992 15:13:53 +0000 (15:13 +0000)
Tools/scripts/h2py.py

index ff2afc24d068434f5aa8d17bc0cc27bc1b61551a..2fc26d81f86ffa4534cdc0969edaea48fb36c071 100755 (executable)
@@ -1,4 +1,3 @@
-#! /ufs/guido/bin/sgi/python
 #! /usr/local/python
 
 # Read #define's from stdin and translate to Python code on stdout.
@@ -18,7 +17,7 @@ import sys, regex, string
 
 p_define = regex.compile('^#[\t ]*define[\t ]+\([a-zA-Z0-9_]+\)[\t ]+')
 
-p_comment = regex.compile('/\*\([^*]+\|\*+[^/]\)*\*+/')
+p_comment = regex.compile('/\*\([^*]+\|\*+[^/]\)*\(\*+/\)?')
 
 def main():
        process(sys.stdin)