summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2011-02-17 21:31:29 -0600
committerDavid Beazley <dave@dabeaz.com>2011-02-17 21:31:29 -0600
commitb680111af209325e7707b803025f5a382715719d (patch)
treed2ed42d84f312c49f6912eaf7227164e610bb1c0
parentc971fabd07cb0988b30e3288229d2abc88af0da2 (diff)
downloadply-b680111af209325e7707b803025f5a382715719d.tar.gz
Python3.2 fixes
-rw-r--r--ANNOUNCE8
-rw-r--r--CHANGES10
-rw-r--r--README14
-rw-r--r--setup.py7
4 files changed, 26 insertions, 13 deletions
diff --git a/ANNOUNCE b/ANNOUNCE
index 735aa87..bdc1c10 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,11 +1,11 @@
-September 2, 2009
+February 17, 2011
- Announcing : PLY-3.3 (Python Lex-Yacc)
+ Announcing : PLY-3.4 (Python Lex-Yacc)
http://www.dabeaz.com/ply
-I'm pleased to announce PLY-3.3--a pure Python implementation of the
-common parsing tools lex and yacc. PLY-3.3 is a minor bug fix
+I'm pleased to announce PLY-3.4--a pure Python implementation of the
+common parsing tools lex and yacc. PLY-3.4 is a minor bug fix
release. It supports both Python 2 and Python 3.
If you are new to PLY, here are a few highlights:
diff --git a/CHANGES b/CHANGES
index 4e88388..34bf50f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,13 @@
-Version (in progress)
+Version 3.4
---------------------
+02/17/11: beazley
+ Minor patch to make cpp.py compatible with Python 3. Note: This
+ is an experimental file not currently used by the rest of PLY.
+
+02/17/11: beazley
+ Fixed setup.py trove classifiers to properly list PLY as
+ Python 3 compatible.
+
01/02/11: beazley
Migration of repository to github.
diff --git a/README b/README
index cec9ece..f384d1a 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
-PLY (Python Lex-Yacc) Version 3.3
+PLY (Python Lex-Yacc) Version 3.4
-Copyright (C) 2001-2009,
+Copyright (C) 2001-2011,
David M. Beazley (Dabeaz LLC)
All rights reserved.
@@ -177,7 +177,7 @@ def t_newline(t):
t.lexer.lineno += t.value.count("\n")
def t_error(t):
- print "Illegal character '%s'" % t.value[0]
+ print("Illegal character '%s'" % t.value[0])
t.lexer.skip(1)
# Build the lexer
@@ -200,7 +200,7 @@ def p_statement_assign(p):
def p_statement_expr(p):
'statement : expression'
- print p[1]
+ print(p[1])
def p_expression_binop(p):
'''expression : expression PLUS expression
@@ -229,18 +229,18 @@ def p_expression_name(p):
try:
p[0] = names[p[1]]
except LookupError:
- print "Undefined name '%s'" % p[1]
+ print("Undefined name '%s'" % p[1])
p[0] = 0
def p_error(p):
- print "Syntax error at '%s'" % p.value
+ print("Syntax error at '%s'" % p.value)
import ply.yacc as yacc
yacc.yacc()
while 1:
try:
- s = raw_input('calc > ')
+ s = raw_input('calc > ') # use input() on Python 3
except EOFError:
break
yacc.parse(s)
diff --git a/setup.py b/setup.py
index 672dae2..670cb3c 100644
--- a/setup.py
+++ b/setup.py
@@ -14,13 +14,18 @@ PLY provides most of the standard lex/yacc features including support for empty
productions, precedence rules, error recovery, and support for ambiguous grammars.
PLY is extremely easy to use and provides very extensive error checking.
+It is compatible with both Python 2 and Python 3.
""",
license="""BSD""",
- version = "3.3",
+ version = "3.4",
author = "David Beazley",
author_email = "dave@dabeaz.com",
maintainer = "David Beazley",
maintainer_email = "dave@dabeaz.com",
url = "http://www.dabeaz.com/ply/",
packages = ['ply'],
+ classifiers = [
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 2',
+ ]
)