Implementing The Experiment ST Meta-Syntax

1 view
Skip to first unread message

Paul Tarvydas

unread,
Jul 14, 2026, 2:53:37 PMJul 14
to pi...@googlegroups.com

Maybe of interest?... This is a screencast of how I implement a new language. It's a long (80-minute) Twitch-like video (little editing to take out the boring parts where I scratch my head and wonder). 

I pick on a small snippet of code and develop a grammar and a set of rewrite rules (one set for Python, another for Javascript) and show how I clone the tools and use ohm-editor to develop the initial grammar. At the end, my new syntax is cast into code that is acceptable to Python and to node.js.

The grammar is 26 lines long, the rewrite rule code is 33 lines (for Python) and 30 lines (for JS).

I include boilerplate code that is like a compiler runtime, but built with what the target language (Python, JS) provides.

I've used Odin as a target language in the past, but, that's not shown in this video (my facility for using Odin has faded).

Creating a new language no longer implies that you have to write a full-blown compiler, too.

Implementing The Experimental ST Meta-Syntax


pt


Reply all
Reply to author
Forward
0 new messages