Title: parser module validation failure
Type: Stage:
Components: Interpreter Core Versions: Python 2.3
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 2003-01-29 23:11 by logistix. This issue is now closed.

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
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 
>>> import parser
>>> a = file('c:\\python23\\lib\\').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


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 

The problem is floor division // on the line:

msg14300 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2003-01-29 10:52
Logged In: YES 

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 

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 

Checked in as:

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

logistix, can you check this works for you?

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

Yeah, works fine.  Thanks for the prompt action.
Date User Action Args
2003-01-29 02:28:43logistixcreate