Springleik
A Case Study in Small Languages
DOI:
https://doi.org/10.31224/8825Keywords:
Abstract Syntax Trees, Domain-Specific Language (DSL), Language Design, Embedded Systems EngineeringAbstract
Small languages arise in software engineering for a variety of reasons. A simple command prompt can be useful in bringing up new hardware, particularly on small targets running embedded firmware. This leads naturally to a scriptable interface. Which can then evolve further into a primitive domain-specific language (DSL) that supports use cases in development, test, and even production. This work describes one path through the steps that lead from command prompt to small language, resulting in an abstract syntax tree (AST) interpreter implemented using ordinary programming facilities of the host language. Concrete syntax is generated automatically by serializing the AST, while a parser for the concrete syntax is optional. We describe a regression test framework based on asymmetric tree comparisons of serialized AST outputs.
Downloads
Downloads
Posted
License
Copyright (c) 2026 Mark Williamsen

This work is licensed under a Creative Commons Attribution 4.0 International License.