plans for the peg parser in pypy 3.9

Hi all, so I've been hacking on getting an rpython version of the new peg parser that cpython introduced in 3.9, and switched exclusively to in 3.10. My status on the py3.9-peg-parser branch is that I managed to build a full pypy-c with the new parser for the first time today, but there are still a number of bugs (in particular, the interactive console is pretty broken). I wanted to keep you in the loop on my plans for further steps: - I plan to fix the bugs, obviously ;-) - CPython made it possible to switch between the old and the new parser in 3.9 with an environment variable. Unless somebody gives extremely strong reasons for also having that feature, I would like to focus on using the new parser exclusively. Being able to switch is quite a big hassle, and I don't see it buying a lot. - That said, I intend to keep the "parser" module functional for 3.9, like CPython did. It will be removed (for us and for them) in 3.10. Let me know if you are unhappy with that approach! Cheers, Carl Friedrich

On 07.11.21 20:40, Carl Friedrich Bolz-Tereick wrote:
- That said, I intend to keep the "parser" module functional for 3.9, like CPython did. It will be removed (for us and for them) in 3.10.
It seems that won't completely work. the module makes it possible to compile a concrete syntax tree to bytecode, which we can't do without keeping the old astbuilder around (which I don't want to do). So the .compile method on stnodes will be disabled. Cheers, Carl Friedrich

Kudos on the great work! I honestly don't think there's a need to keep the old parser around if CPython already proved that the new one works just fine. I think we're allowed to be less conservative here because of that. We can always revert your patch if something goes wrong. בתאריך יום ג׳, 9 בנוב׳ 2021 ב-19:29 מאת Carl Friedrich Bolz-Tereick < cfbolz@gmx.de>:

On 07.11.21 20:40, Carl Friedrich Bolz-Tereick wrote:
- That said, I intend to keep the "parser" module functional for 3.9, like CPython did. It will be removed (for us and for them) in 3.10.
It seems that won't completely work. the module makes it possible to compile a concrete syntax tree to bytecode, which we can't do without keeping the old astbuilder around (which I don't want to do). So the .compile method on stnodes will be disabled. Cheers, Carl Friedrich

Kudos on the great work! I honestly don't think there's a need to keep the old parser around if CPython already proved that the new one works just fine. I think we're allowed to be less conservative here because of that. We can always revert your patch if something goes wrong. בתאריך יום ג׳, 9 בנוב׳ 2021 ב-19:29 מאת Carl Friedrich Bolz-Tereick < cfbolz@gmx.de>:
participants (3)
-
Carl Friedrich Bolz-Tereick
-
Omer Katz
-
Simon Cross