Skip to main content

C(++)

Glue category for collecting anything related to C and C++ programming.

An introduction to compiler construction using flex and yacc

Posted in

Ever wondered, how compilers work or wanted to build one yourself, but just didn't know where to start? Seen the tools commonly used for compiler construction, but just couldn't wrap your head around on how to use them? Well, you have come to the right place then. In today's blogpost, I'd like to give an introduction on how to use flex and yacc, by showing how to implement a toy programming language, as well as a virtual machine able to run the compiled code of programs written in this language.

Syndicate content