DuckLogic / Pathos

A recursive decent parser for Python code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pathos: A Python Parser [DEAD]

This was my attempt at writing a recursive-decent parser by hand, for the python source code.

It worked fairly well (for a subset of code) but it was large and clunky.

I have since decided to try and avoid hand-written parsers ;)

Parser generators

If you're into parser generators, take a look at:

  1. parol - LL(k)
  2. pest - PEG
  3. tree-sitter - LR(1)
  4. lalrpop LR(1) or LALR(1)
  5. Antlr - Amazing magic but Rust bindings are experimental :(

If you're into parser combinators, take a look at:

  1. combine - Looks neat
  2. chumsky - Excellent error recovery and messagses
  3. nom - Stable

ASTs

I did some work on ASDLR ASTs here. That has since moved to a seperate project.

About

A recursive decent parser for Python code

License:MIT License


Languages

Language:Rust 98.1%Language:Python 1.9%