[Python-bugs-list] [ python-Bugs-676521 ] parser module validation failure

SourceForge.net noreply@sourceforge.net
Wed, 29 Jan 2003 06:17:09 -0800


Bugs item #676521, was opened at 2003-01-28 21:28
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=676521&group_id=5470

Category: Parser/Compiler
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: logistix (logistix)
Assigned to: Nobody/Anonymous (nobody)
Summary: parser module validation failure

Initial Comment:
C:\>c:\python23\python
Python 2.3a1 (#38, Dec 31 2002, 17:53:59) [MSC 
v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more 
information.
>>> import parser
>>> a = file('c:\python23\lib\base64.py').read()
>>> b = parser.suite(a)
>>> c = parser.ast2tuple(b)
>>> d = parser.sequence2ast(c)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
parser.ParserError: VALIDATION FAILURE: report this 
to the maintainer!
>>> ^Z


C:\>

Problem also occurred on Python 2.2.2 on WinXP and 
RedHat 7.3

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2003-01-29 09:17

Message:
Logged In: YES 
user_id=33168

I'm not familiar with the parser module (this is the first
time I've looked at it).  But the patch looks correct.

As for the PEP, I think it's a good idea.  It would help
point out many details people (like me) are probably unaware of.

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2003-01-29 05:52

Message:
Logged In: YES 
user_id=6656

So the attached would be the fix, then?

I feel a "How to change Python's grammar" informational PEP
coming on...

----------------------------------------------------------------------

Comment By: Neal Norwitz (nnorwitz)
Date: 2003-01-28 21:46

Message:
Logged In: YES 
user_id=33168

The problem is floor division // on the line:

  MAXBINSIZE = (MAXLINESIZE//4)*3

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=676521&group_id=5470