Issue #15054: Fix incorrect tokenization of 'b' string literals.

Patch by Serhiy Storchaka.
This commit is contained in:
Meador Inge 2012-06-16 21:49:08 -05:00
parent 2d9db1dfce
commit 8d5c0b8c19
3 changed files with 81 additions and 1 deletions

View file

@ -127,7 +127,7 @@ Floatnumber = group(Pointfloat, Expfloat)
Imagnumber = group(r'[0-9]+[jJ]', Floatnumber + r'[jJ]')
Number = group(Imagnumber, Floatnumber, Intnumber)
StringPrefix = r'(?:[uU][rR]?|[bB][rR]|[rR][bB]|[rR]|[uU])?'
StringPrefix = r'(?:[uUbB][rR]?|[rR][bB]?)?'
# Tail end of ' string.
Single = r"[^'\\]*(?:\\.[^'\\]*)*'"