AGC Grammar

Every IT geek is, to some degree, fascinated with the Apollo program which put a human on the moon for the first time. Naturally, there is also curiosity about the computers on the Apollo moon lander, and the software that ran on them. The source code that went to the moon is available now, and you can take a look at it here.

I'm interested in the Apollo program, but I'm also interested in formal grammars, and a committer to the Antlr project. So, I spent some time building an Antlr4 grammar for the Apollo source code. You can take a look at it here. The grammar can parse a number of files from the Solarium55 source code, which is the source code that flew Apollo4. If you're keen you could try it on the Apollo13 source code, called Artemis072, but you'd have to key in the source from jpg images of the form-feed printouts (here).

It's natural to ask why a Antlr4 grammar for AGC source code would be useful. In addition to the obvious "because that goalwill serve to organize and measure the best of our energies and skills", it's the first step in building a simulator. There is already an excellent C simulator here, and there are numerous JS ones on the web, but I thought it might be helpful to have an Antlr4 grammar that can output parser-lexers for new simulators in other languages. Also, it was very interesting to learn about the AGC computer and to see how software development has progressed since the 1960's.