This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: parser module validation failure
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mwh Nosy List: logistix, mwh, nnorwitz
Priority: normal Keywords:

Created on 2003-01-29 02:28 by logistix, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
parser-fixes.diff mwh, 2003-01-29 10:52 mwh's fixes
Messages (6)
msg14298 - (view) Author: Grant Olson (logistix) Date: 2003-01-29 02:28
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
msg14299 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-29 02:46
Logged In: YES 
user_id=33168

The problem is floor division // on the line:

  MAXBINSIZE = (MAXLINESIZE//4)*3
msg14300 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2003-01-29 10:52
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...
msg14301 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-01-29 14:17
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.
msg14302 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2003-01-29 14:26
Logged In: YES 
user_id=6656

Checked in as:

Modules/parsermodule.c revision 2.75
Lib/test/test_parser.py 1.14

logistix, can you check this works for you?

PEP already with editors.  It wasn't very long, as it turned
out.
msg14303 - (view) Author: Grant Olson (logistix) Date: 2003-01-29 23:11
Logged In: YES 
user_id=699438

Yeah, works fine.  Thanks for the prompt action.
History
Date User Action Args
2022-04-10 16:06:16adminsetgithub: 37862
2003-01-29 02:28:43logistixcreate