summaryrefslogtreecommitdiff
path: root/pycparser/c_lexer.py
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2017-03-05 04:52:22 +0200
committerEli Bendersky <eliben@users.noreply.github.com>2017-03-04 18:52:22 -0800
commit2129f5fb1ec2d06000f10c96510874c5303d9f8c (patch)
tree27b0d07899f6cdea615b79d90d0db1b418bd18c1 /pycparser/c_lexer.py
parent69bca70ea145ac81f6b950a741f5e08183d3e0fa (diff)
downloadpycparser-2129f5fb1ec2d06000f10c96510874c5303d9f8c.tar.gz
Python 3.6 invalid escape sequence deprecation fixes (#177)
https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior
Diffstat (limited to 'pycparser/c_lexer.py')
-rw-r--r--pycparser/c_lexer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pycparser/c_lexer.py b/pycparser/c_lexer.py
index 00dcd97..d9941c1 100644
--- a/pycparser/c_lexer.py
+++ b/pycparser/c_lexer.py
@@ -52,8 +52,8 @@ class CLexer(object):
# Allow either "# line" or "# <num>" to support GCC's
# cpp output
#
- self.line_pattern = re.compile('([ \t]*line\W)|([ \t]*\d+)')
- self.pragma_pattern = re.compile('[ \t]*pragma\W')
+ self.line_pattern = re.compile(r'([ \t]*line\W)|([ \t]*\d+)')
+ self.pragma_pattern = re.compile(r'[ \t]*pragma\W')
def build(self, **kwargs):
""" Builds the lexer from the specification. Must be