Stanford Compilers: Bison Parser for Cool

Completed assignment #2, which is a Bison Parser for cool. I posted this project on github (here), which includes a makefile for OSX. Honestly, there weren't too many gotchas to this project. The most difficult things to figure out were the required AST (abstract syntax tree) operations that were expected ...

Stanford Compilers: gdb with myparser

Still working on the actual parser, but I did run into a situation where I actually needed to debug the parser in gdb. Not immediately obvious how to get this working, so I modified the myparser shell script with my findings. ...

Stanford Compilers: Writing a Flex lexer for Cool

I just finished the first programming assignment for the Stanford Compilers course, which was to implement a lexer for the Cool (classroom object oriented language) using Flex. Flex is a C-language based lexical analyzer generator. It generates a valid c source file for the lexical rules you put together. The ...

Stanford Compilers

Direct link to my course notes: http://jmoyers.org/compilers/ Welp, still on the journey down to the hardware. Now that I've got the nand2tetris class on building a computer from nand gates out of the way, its time to dive into compilers. I've decided to take Stanford's Coursera offering, ...

Building a computer from nand gates 🔨

Course: http://nand2tetris.org/ My Computer (hdl): https://github.com/jmoyers/nand2tetris My Hack Assembler (rust): https://github.com/jmoyers/hack_assembler So I was able to build a baby computer in a hardware simulator. I learned quite a bit about how CPU's are designed and how they interact with ...