Use raw strings for regex patterns. Fixes #1389

This commit is contained in:
justvanrossum 2018-12-05 12:46:36 +01:00
parent 93633a85ef
commit 1828dae78a

View File

@ -159,7 +159,7 @@ def bitRepr(value, bits):
return s
_mnemonicPat = re.compile("[A-Z][A-Z0-9]*$")
_mnemonicPat = re.compile(r"[A-Z][A-Z0-9]*$")
def _makeDict(instructionList):
opcodeDict = {}
@ -195,8 +195,8 @@ _whiteRE = re.compile(r"\s*")
_pushCountPat = re.compile(r"[A-Z][A-Z0-9]*\s*\[.*?\]\s*/\* ([0-9]+).*?\*/")
_indentRE = re.compile("^FDEF|IF|ELSE\[ \]\t.+")
_unindentRE = re.compile("^ELSE|ENDF|EIF\[ \]\t.+")
_indentRE = re.compile(r"^FDEF|IF|ELSE\[ \]\t.+")
_unindentRE = re.compile(r"^ELSE|ENDF|EIF\[ \]\t.+")
def _skipWhite(data, pos):
m = _whiteRE.match(data, pos)