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.
- Many legacy languages have no written specification. The languages people most need parsers for are exactly the ones that were never standardized, or whose vendor documentation described a dialect nobody actually runs.
- Progress against a specification cannot be measured. “Three of twenty chapters covered, so we are at fifteen per cent” is not a measurement. Verifying that a chapter is genuinely covered is a manual reading exercise, and it cannot be automated.
- Specifications are open to interpretation. The engineering team and the client can read the same paragraph and disagree about what conformance means — usually at the point where one of them wants to declare the work complete.
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.
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.
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.
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.
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.
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.
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.
- Check one — parse every example. The parser produces a syntax tree for every file in the validation set. This proves it can read the whole set, with nothing excluded for being inconvenient.
- Check two — validate the tree for every construct. The abstract syntax tree built for each language construct in the set is inspected and confirmed correct. This proves the model is right, not merely that parsing did not throw.
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.
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.
- The team always knows what to do next. At any moment the current phase and the current failing item determine the next task. Nobody has to stop and decide what the priority is, because the checks decide it.
- The tooling removes the repetitive parts. An issue reported in a tool navigates straight to the offending point in the source. If running the parser requires a rebuild, the rebuild starts by itself. Every step that a machine can take is taken by a machine, so the engineers spend their time on the constructs that are genuinely hard.
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.
- Connectivity. Every parser we build is based on Starlasu and produces an abstract syntax tree in a shared shape, so our parsers interoperate with each other and with the ones already in our catalog. The trees support LionWeb, the open interoperability standard, and they are reachable through bindings from Java, Kotlin, Python, TypeScript and C# — so the team consuming the parser does not have to adopt the language it was written in.
- Documentation. The documentation is generated from the parser rather than written alongside it, which is what keeps it describing the tree you actually receive after the third round of changes.
- Teachability. The method is designed to be taught. That means we can keep a team able to maintain your parser, and it means we can train your own team to take it over. Either way you are not dependent on the availability of one person.
“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.”
What it changes for you
- The goal is agreed before the money is. Scope arguments in parser projects almost always come from a goal that was never written down. Here it is written down, in the form of a file list and two checks, before development starts.
- Progress is a number you can read. Not a status color and not a narrative. The proportion of the validation set that parses, and the proportion of constructs whose trees have been validated.
- Integration is part of the job, not a follow-on quote. Connectivity, documentation and handover are inside the method rather than outside it.
- You are not locked to us afterwards. Starlasu is Apache-2.0 and public, the documentation describes the real tree, and the method is teachable — which is what makes taking maintenance in-house a real option rather than a polite fiction.
Honest limits
- No validation set, no method. If you cannot supply representative files, Chisel has nothing to measure against and we cannot give you a fixed goal. This is the one thing that genuinely blocks a start, and it is worth resolving before anything else.
- The set defines the scope, which cuts both ways. A construct that appears nowhere in the validation set is not covered by the goal. That is the honest consequence of having a goal at all, and it is why choosing the set is a step with your name on it too.
- Complete does not mean finished forever. Passing both checks means the first version ships. Real estates keep producing new files; adding them is maintenance, and it is a new goal each time.
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.