diff -r ad56dff3602f Tools/unicode/mkstringprep.py --- a/Tools/unicode/mkstringprep.py Tue May 28 16:27:08 2013 +0300 +++ b/Tools/unicode/mkstringprep.py Tue May 28 20:50:52 2013 +0300 @@ -71,6 +71,8 @@ else: if not curname: raise RuntimeError("End without start", l) + if curname != m.group(2): + raise RuntimeError("Unexpected end", l) curname = None continue if not curname: