Fix regexp recognizing comments to cope with unterminated comments.

This commit is contained in:
Guido van Rossum 1992-06-05 15:13:53 +00:00
parent aad5344fc1
commit 047979e3d5
1 changed files with 1 additions and 2 deletions

View File

@ -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 @@
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)