Parcom: CL Parser Combinators
Published on: 2025-08-15 12:53:34
parcom - Parser Combinators
parcom is a consise Parser Combinator library in the style of Haskell’s parsec and Rust’s nom .
( in-package :parcom ) (parse (*> ( string " Tempus " ) #' space ( string " fugit " )) " Tempus fugit. " )
fugit
parcom operates strictly on strings, not streamed byte data, but is otherwise “zero copy” in that extracted substrings of the original input are not reallocated.
parcom has no dependencies.
Table of Contents
Compatibility
Compiler Status SBCL ✅ ECL ✅ Clasp ❓ ABCL ✅ CCL ✅ Clisp ✅ Allegro ✅ LispWorks ❓
API
The examples below use (in-package :parcom) for brevity, but it’s assumed that you’ll use a local nickname like pc in your actual code. Further, most examples run the parsers with parse , but occasionally funcall is used instead to demonstrate what the remaining input would be after the parse succeeded. You will generally be using parse in your own code.
Types and Running Parsers
All parsers have the function signature string -> parser , whe
... Read full article.