CoreDump: COOL from Stanford

Welcome to Core Dump, the One Stop for Techies, in this episode Gecko and the Trio, design a parser with GNU Bison and Jison for the COOL language, from the edx course by Stanford.

Dump 12.12.2021.13.47

Trio: We just audited this compiler course from Stanford, using the classroom object-oriented language, we have the formal definition for COOL, it is:

COOL.y

Can we just use Jison to create a parser?

Gecko:

Yeah a GUI for the parser is available on JISON Debugger.

You can either paste a Bison syntax definition of the COOL language or compile the parser on the github repository linked above, CLI = GUI?

Trio: That simple, a scanner and a parser, and a graphical tree output and a JSON dump. Can we convert this JSON to DOM or XML, maybe XML to code generate and optimize, or the JSON itself.

Gecko: The JSON is persisted and scanned to a backend map, I can author to ready code? A ready compiler? Proving the Code like a Droid approach, all we need to learn are the CFG grammars?

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store