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.

Author BTaskaya
Recipients BTaskaya, Peter Ludemann, benjamin.peterson, fireattack, georg.brandl, gregory.p.smith, lisroach, lukasz.langa, miss-islington, pablogsal, thatch
Date 2020-12-06.21:12:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Every piece of code that uses either lib2to3 or a parser derived from it (including parso and LibCST) will eventually not be able to upgrade the parser because PEG can handle grammars that LL(k) can't.

Since these projects are external, depending on the functionality they are free-to-roll their own parser implementations or make hacks to pass away things. Or fork the Grammar/python.gram to preserve all tokens and generate a Python parser from it.

> If people are interested in using ast.parse extensions as a replacement for lib2to3, I suggest discussing at

I don't quite get what you are proposing here, 

>I propose implementing an optional pass over the parse tree that records lib2to3's "prefix" with each leaf node. The interface would be something like:

How would you do that? By augmenting the AST with the information retrieved from tokens? If so, check this out; and asttokens.

Also, please move the discussion to somewhere else (like etc.) since this is not the ideal place to discuss and people might be distracted! (feel free to cc me where you move the discussion)
Date User Action Args
2020-12-06 21:12:35BTaskayasetrecipients: + BTaskaya, georg.brandl, gregory.p.smith, benjamin.peterson, thatch, lukasz.langa, fireattack, lisroach, pablogsal, miss-islington, Peter Ludemann
2020-12-06 21:12:35BTaskayasetmessageid: <>
2020-12-06 21:12:35BTaskayalinkissue36541 messages
2020-12-06 21:12:35BTaskayacreate