parsonic

2026-11-29

Fast parser combinators and compiler for Common Lisp.

Upstream URL

github.com/bohonghuang/parsonic

Author

Bohong Huang <bohonghuang@qq.com>

Maintainer

Bohong Huang <bohonghuang@qq.com>

License

Apache-2.0
README
Parsonic

A fast parser combinator library for Common Lisp.

1Introduction

Parsonic is a parser combinator framework for Common Lisp, but comeswith an optimizing compiler.

Like most parser combinator libraries, Parsonic allows defining context-sensitive rules in a functional way, supporting recursion (right-recursion), higher-order parsers, and runtime dynamic parser selection, all of which are analyzed and transformed at compile time with zero runtime overhead.

Parsonic performs automatic inlining, CSE optimization, and Trie jump table generation at compile time, and then compiling all parser definitions down to efficient Lisp code within a lambda specialized for the specific input type.

2Examples

This library is currently developed primarily for my personalprojects; there is no guarantee of API or implementation stability.For those interested, the following parser implementations can serveas examples for reference:
  • JSON Parser \\A JSON parser implemented in roughly 100 LOC.
  • YAML 1.2 Parser \\A fairly complete implementation of a YAML 1.2 parser.

Dependencies (2)

  • alexandria
  • buffered-streams

Dependents (2)

  • GitHub
  • Quicklisp