Kaydet (Commit) 047979e3 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix regexp recognizing comments to cope with unterminated comments.

üst aad5344f
#! /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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment