Rython 💭

A (yet) fictionnal ruby gem, that allow to run pyhon code

Parsing python 🚧

In ruby

  • Treetop - the PEG parser
  • racc - an LALR(1) parser generator.

In Python

  • Lark / doc / online ide - a parsing toolkit for Python support Earley and LARL.
    • Python 3 grammar for Lark - uses the Earley parser not LALR, because python’s grammar has context-sensitive features
    • transformed versions of the grammar can be parsed with LALR(1)
    • using a PEG/packrat parser won’t have these limitation and should allow for the same.

Parsing Indentation

Python3 lark indentation support

Pure PEG cannot parse indentation. But some PEG parser can.

Written on May 15, 2025, Last update on June 14, 2025
python parser dream project