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 asts don't match grammar
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: logistix
Priority: normal Keywords:

Created on 2004-11-12 00:09 by logistix, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
init.2.3.txt logistix, 2004-11-12 00:10 ast tree via python 2.3
init.2.4.txt logistix, 2004-11-12 00:11 ast tree via python 2.3
testParser.py logistix, 2004-11-12 00:12 simple test script
Messages (2)
msg23104 - (view) Author: Grant Olson (logistix) Date: 2004-11-12 00:09
A program of mine ran into an error while testing against 
python 2.4.  It grabs source files and uses the parser 
module to generate asts.

I've attached the output from an ast generated from 
\lib\bsddb\__init__.py in both python 2.3 and 2.4.  I'll 
snip the important stuff here though.

===2.3====
[257,
 [264,
  [265,
   [266,...
=========

===2.4====
[257,
 [266,
  [267,
   [268,...
=========

2.3 correctly goes from file_input node to a stmt node.
2.4 goes from file_input node to a small_stmt node.

I did check the grammar file since there have been some 
language changes for 2.4, and it still has the line:

file_input: (NEWLINE | stmt)* ENDMARKER

I don't know if the error is in the parsermodule or the 
parser itself.

I'll also note that the file in question isn't using any of 
the new language features.
msg23105 - (view) Author: Grant Olson (logistix) Date: 2004-11-12 04:13
Logged In: YES 
user_id=699438

Disregard.  Somehow PythonWin 2.3 stuck as the editor after 
the upgrade.  The numbers associated with symbols did 
change and I wasn't catching it.
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41164
2004-11-12 00:09:09logistixcreate