The Grammar on the Sacred Machine
I spent an entire semester of compiler construction convinced I was wasting my time. Not quietly skeptical. Actively resentful. I did the assignments. I passed the exam. I built the parser. And the whole time I kept thinking: I am never going to use this. Normal people write application code. They call APIs. They do not sit around writing LALR grammar definitions for a living.
Two years later I was sitting in front of a SQL grammar file trying not to break anything.
The bug
My first job was writing JDBC and ODBC drivers. One of those tasks is maintaining the SQL parsing logic: you need to understand what the database client is asking before you can translate it to the wire protocol. We had a bug. Some SQL construct was being parsed incorrectly. My senior colleague handed it to me.
I reproduced it, read through the grammar, found the issue. It was fixable. I said I could fix it.
He said: not on your machine.
I said: what?
He explained that there was a special machine. The parser generator we used, Visual Parse++, was a commercial tool with a machine-bound license. The license lived on one specific computer. That was the only computer. You could not install Visual Parse++ anywhere else because the company that made it, Sandstone Technology, reportedly based in Lahaina, Hawaii, had stopped responding. Phone went unanswered. Website went dark. No one knew whether they had been acquired, dissolved, or whether the founder had cashed out and retired somewhere warm. There was no way to get a new license. The one you had was the one you had.
So there was one machine. It was treated accordingly.
The protocol
The machine was powered off when not in use. It was powered on only when someone needed to regenerate parser output. Two people worked together when this happened, not because the work required it, but because you did not want to be alone if something went wrong. Wrong meaning: the machine failed, the license stopped working, the generated output corrupted. Any of those things happening meant you were done. There was no recovery.
I did not fully understand why they were so cautious at the time. I found out later that Visual Parse++ used machine-tied activation keys. The activation was not transferable. If the physical machine died, the license died with it. With the company gone, there was no support number to call, no email that got answered, no migration path. The license was the machine. The machine was the license.
We powered it on. We made the change to the grammar. We generated the new Java parser output. We tested it. We powered it off.
That was the whole process.
The audit
A year or two later, the customer we were building drivers for got acquired. Large company, serious process. When that happens, the acquiring company does a supply chain review: every dependency, every vendor, every piece of software in the build chain gets inventoried and assessed.
They flagged Visual Parse++.
The product was unsupported. The vendor was unreachable. The license was tied to a single aging physical machine. That was three problems, and any one of them was enough. The assessment was: this dependency needs to go.
I remember being struck by this. Supply chain audits are the kind of process that feels like big company bureaucracy when you are on the outside of one. Checklists, vendor questionnaires, dependency inventories. Easy to dismiss as overhead. But this one caught something real. A risk that had been quietly sitting in our build process for years, hidden behind a machine we treated carefully, got surfaced in days by a process that did not know anything about us and did not care. It just ran the checklist. The checklist worked.
The migration
Replacing Visual Parse++ meant replacing the parser. The grammar we had was written for an LALR parser. The target we migrated to was ANTLR, which is a recursive descent parser, fundamentally different in approach, different strengths, different failure modes.
LALR grammars and LL grammars are not the same thing. You cannot take one and hand it to the other generator and expect it to work. An ambiguity that an LALR parser resolves one way might cause an LL parser to recurse infinitely. Productions that are natural to write in one formalism are awkward or illegal in the other. I had two other engineers and a complete understanding of what the grammar needed to produce, and we still had to redesign significant portions of it.
We shipped it. The JDBC driver came out with the new parser, built on ANTLR, with no machine-bound license, no single point of failure, and no ritual around the build process. No one outside the team knew anything had changed.
What I was wrong about
I said I would never use compiler construction. I used it two years after graduation to fix a production bug in a SQL parser. I used it again to redesign that parser entirely.
The part I underestimated was not the theory. It was the context. The theory is just the formalism. What I did not know in college was that SQL parsing is a solved problem only if you have the right tools and the right license. I did not know that companies make decisions about parser generators the same way they make decisions about any commercial dependency, and that those decisions have long tails. I did not know that a company founded in Hawaii could stop answering its phone and leave JDBC driver teams in India working around a machine like it was some kind of oracle.
The compiler construction course did not teach me any of that. But it gave me enough vocabulary to understand the problem when I ran into it, and enough foundation to do something about it when I needed to.
That turns out to be most of what education is for.
Update: At the time I was working in India and had genuinely no idea where Hawaii was or why it kept coming up as a place people retired to. I have since fixed that. Over the years I have visited multiple islands across several trips and it is one of my favorite places on this planet. Not to retire. Just to visit, repeatedly. Whoever from Sandstone Technology ended up there made a reasonable choice.
Photos from a few of those trips: