summaryrefslogtreecommitdiff
path: root/ext/ply/example/yply/ylex.py
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-08-16 13:39:58 -0700
committerNathan Binkert <nate@binkert.org>2009-08-16 13:39:58 -0700
commite1270f81bdc81f5a575b34c2d2c294bdde3e6f4f (patch)
treeb54af3469a338609faf04e67603c5264e79d59a5 /ext/ply/example/yply/ylex.py
parentbcaf93d182f43bf72d52104bb909324945904120 (diff)
downloadgem5-e1270f81bdc81f5a575b34c2d2c294bdde3e6f4f.tar.xz
ply: update PLY to version 3.2
Diffstat (limited to 'ext/ply/example/yply/ylex.py')
-rw-r--r--ext/ply/example/yply/ylex.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/ply/example/yply/ylex.py b/ext/ply/example/yply/ylex.py
index 61bc0c7ef..84f2f7a73 100644
--- a/ext/ply/example/yply/ylex.py
+++ b/ext/ply/example/yply/ylex.py
@@ -42,7 +42,7 @@ def t_SECTION(t):
# Comments
def t_ccomment(t):
r'/\*(.|\n)*?\*/'
- t.lineno += t.value.count('\n')
+ t.lexer.lineno += t.value.count('\n')
t_ignore_cppcomment = r'//.*'
@@ -95,7 +95,7 @@ def t_code_error(t):
raise RuntimeError
def t_error(t):
- print "%d: Illegal character '%s'" % (t.lineno, t.value[0])
+ print "%d: Illegal character '%s'" % (t.lexer.lineno, t.value[0])
print t.value
t.lexer.skip(1)
@@ -104,9 +104,9 @@ lex.lex()
if __name__ == '__main__':
lex.runmain()
+
+
+
-
-
-
-
+