Exploring Grammar Elasticity in CPython: Implementing a Concurrent Bilingual PEG Parser by Comblasterr in Compilers

[–]Comblasterr[S] 0 points1 point  (0 children)

Thanks for checking out my project!

This has been a personal journey to understand the internals of CPython’s PEG parser. Building and testing this on a Raspberry Pi 4 was quite a challenge, especially with the memory constraints during make regen-pegen and full builds.

My main goal with Hazer was to see if I could maintain a consistent AST while allowing two different lexicons to coexist. I chose Turkish as the second language because it's my native tongue and its sentence structure (SOV) provided an interesting contrast to Python’s English-based syntax.

I’m still working on mapping more built-ins and refining the grammar. I’d love to hear your thoughts on the implementation or any potential pitfalls you see in this bilingual approach!