Commits

David Beazley committed b8df069

Python3.2 fixes

Comments (0)

Files changed (4)

-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:
-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.
 
-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.
 
     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
 
 def p_statement_expr(p):
     'statement : expression'
-    print p[1]
+    print(p[1])
 
 def p_expression_binop(p):
     '''expression : expression PLUS expression
     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)
 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',
+              ]
             )