diff options
author | David Beazley <dave@dabeaz.com> | 2011-02-17 21:31:29 -0600 |
---|---|---|
committer | David Beazley <dave@dabeaz.com> | 2011-02-17 21:31:29 -0600 |
commit | b680111af209325e7707b803025f5a382715719d (patch) | |
tree | d2ed42d84f312c49f6912eaf7227164e610bb1c0 | |
parent | c971fabd07cb0988b30e3288229d2abc88af0da2 (diff) | |
download | ply-b680111af209325e7707b803025f5a382715719d.tar.gz |
Python3.2 fixes
-rw-r--r-- | ANNOUNCE | 8 | ||||
-rw-r--r-- | CHANGES | 10 | ||||
-rw-r--r-- | README | 14 | ||||
-rw-r--r-- | setup.py | 7 |
4 files changed, 26 insertions, 13 deletions
@@ -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: @@ -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. @@ -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) @@ -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', + ] ) |