PARSERS & TRANSPILERS · THE CHISEL METHOD

The Chisel Method: how we make parser development finish.

Parser projects have a reputation for running without end. The Chisel Method is how we close them: an objective goal fixed before development starts, measured against a set of your real files, with two mechanical checks that decide when the parser is done.

Chisel is a way of running a parser project, not a product and not a piece of software. We use it on every parser we build, we have published it, and we teach it to client teams who take over maintenance afterwards. Everything below is the method itself, in the order you would encounter it.

The problem it solves

Ask three people when a parser for a legacy language is finished and you will get three answers. That is not carelessness; it is that the usual answers do not survive contact with the work. “When it handles the language” assumes the language is written down. “When it handles our code” assumes somebody has decided which code. “When we stop finding bugs” has no end at all.

The obvious alternative is to make the specification the goal: support everything the language reference describes. It sounds rigorous and it fails for three specific reasons.

A parser that is ninety-five per cent right is worthless, because you cannot tell which five per cent it is wrong about. So the goal has to be something a machine can check.

THE METHOD, STEP BY STEP

Five steps, in this order.

Steps 01 and 02 happen before any parser code is written. That is the part that makes the rest estimable.

01

Choose the validation set

Which files define “done”?

You and we select a set of real example files — your files, not textbook samples — before development begins. The set is the specification. Anything not represented in it is out of scope until it is added deliberately.

02

Fix the two checks

What has to be true of that set?

Every file in the set parses, and the tree produced for every construct in it is validated as correct. Both are mechanical. Neither is open to reinterpretation once the work is under way.

03

The parse phase

Can we read all of it yet?

We work until the first check passes: a tree for every file. Progress is the proportion of the set that parses, so both sides can read the same number on the same day.

04

The AST refinement phase

Is the tree the right tree?

We inspect and improve the trees construct by construct until the second check passes. A parser that reads a file and models it wrongly is worse than one that fails loudly.

05

Adoption

Is it actually being used?

A parser sitting unused has delivered nothing. We support the integration into your pipeline until it runs there, and the documentation describes the tree you will really work against.

The two checks

Everything in the method rests on these, so they are worth stating precisely. Both are run against the validation set agreed in step 01.

When both pass, the parser is complete. The first version is delivered and the maintenance phase begins. If you later want files added to the validation set, that is not a bug report — it is a new goal, agreed as one, with its own scope and its own price.

A validation set of example files passes through two checks: first that every file parses, then that the tree for every construct is validated. Only then is the parser complete.VALIDATION SETyour real files,agreed up frontCHECK ONECHECK TWOas % of the setper constructevery file parsesevery tree isvalidatedCOMPLETE
The goal is a gate, not an opinion. A file either parses or it does not; a construct’s tree is either validated or it is not. That is what lets a parser project have a date.

Frictionless development

The second pillar is about the daily experience of building the parser, and it exists because a method that produces the right answer slowly is not much of a method. Two principles govern it.

Because both phases are measured against a fixed set, progress through the whole process can be expressed as a percentage that means something. We use it for planning, and we report it to you rather than describing the work as “going well”.

Frictionless adoption

A parser is never the end product. It is a component in a pipeline, and it produces value only once it is inside one. The third pillar is the work of getting it there, and it has three parts.

“The supplied software has vastly increased the quality of our development and made us far more efficient. Compared to other projects this was very good, with no unnecessary overhead during the project. The communication was excellent and the consistent use of GitHub was great as we knew the status of all bug fixes.”

Campbell Pryde, President and CEO, XBRL US Inc. — who also told us the one thing he would change: automated daily builds instead of builds delivered ad hoc. More on the clients page.

What it changes for you

Honest limits

Straight answers

Where can I read more about the method itself?

We have written it up as an article: Chisel: an open source method for parsers. If you want to discuss how it would apply to your language, or you are interested in buying a parser from us, schedule a meeting and we will answer your questions.

Does Chisel apply to a parser I already have?

Yes, and it is often the fastest way to find out what you actually own. Assemble a validation set from your real files, run the two checks against the existing parser, and the result is an inventory of what it handles and what it does not — which is a better basis for deciding whether to extend it or replace it than anyone’s opinion.

What can you help with beyond building the parser?

Clients often buy a parser or a transpiler to use inside a larger system and integrate it themselves. Just as often they ask us for training, help with the architectural design, or the implementation of the whole system. We are specialists in language engineering, and those services exist so the parser actually lands somewhere.

Where can I find references from other clients?

The clients page collects logos and testimonials, and individual projects are written up as case studies. There are also interviews on the blog: with Rob Wunderlich and with Campbell Pryde.

What is Starlasu?

Our open-source framework for defining abstract syntax trees and building language tooling on top of them. It is Apache-2.0, it has implementations for Kotlin, Python, TypeScript and C#, and it is what gives every parser we build the same shape. The documentation is at starlasu.strumenta.com.

If you would rather start from the practice than from the method, the overview pages are Parsers and transpilers, custom parser development and the Language Engines we license. To talk about something other than a parser, use the language engineering discovery form.

Bring us a language and a folder of real files.

That is all the method needs to start. We will tell you what a validation set for your language would look like, what the two checks would be measuring, and what it would take to make them pass.

Schedule a meeting

Scroll to Top