← Saturday, September 26, 2026Languages & toolsGuide

Guile PEG parser converts Org content to HTML

jointhefreeworld.org 5 min read Editor score 6/10

The author describes replacing regular expressions with Guile’s PEG module to parse Org and convert it to HTML via SXML. It is a practical parsing example for engineers choosing grammar-based approaches over increasingly complex regexes.

What
OrgWebAlchemy is a Guile Scheme library that parses Org-mode documents and renders them as HTML.
How
It uses PEGs to build an AST, converts that to SXML, then produces HTML instead of relying on a growing set of regular expressions.
Why it matters
A grammar-based pipeline can handle nested lists, blocks and inline markup that make ad hoc parsing brittle.
parse build convert render Org document ParsingExpression AST SXML HTML
OrgWebAlchemy transforms an Org document through a grammar and intermediate representations into HTML. Sketched from the article's own text.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.