summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-06-05 15:13:53 (GMT)
committerGuido van Rossum <guido@python.org>1992-06-05 15:13:53 (GMT)
commit047979e3d5d30feee560f98c9c8d65029a4cbe37 (patch)
tree30b56eac60a12f1972eeda8c4f6afa583da14439 /Tools
parentaad5344fc13d21a998b9a519164bdab68ecacd3b (diff)
downloadcpython-047979e3d5d30feee560f98c9c8d65029a4cbe37.zip
cpython-047979e3d5d30feee560f98c9c8d65029a4cbe37.tar.gz
cpython-047979e3d5d30feee560f98c9c8d65029a4cbe37.tar.bz2
Fix regexp recognizing comments to cope with unterminated comments.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/h2py.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Tools/scripts/h2py.py b/Tools/scripts/h2py.py
index ff2afc2..2fc26d8 100755
--- a/Tools/scripts/h2py.py
+++ b/Tools/scripts/h2py.py
@@ -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)