Principles of Programming Languages

I am teaching Principles of Programming Languages (CSE340) this summer. I have taught this class for two years –Summer 2015, Fall 2014, Summer 2014, Spring 2014, and Summer 2013. In CSE 340  we define an structural programming language and implement a compiler for it while studying theoretical foundations for several programming paradigms including formal lexical, syntactic and semantic descriptions, compilation and run-time issues.


Summer 2015


CSE340 has 28 lectures and includes the following topics:

concepts; lexical analysis; lexer implementation; syntactic analysis; parse tree, BNF, and syntax diagrams; grammars; parser; error synchronization; error recovery; first and follow sets; chomsky hierarchy; semantic analysis; type matching; conditional expressions; and intermediate code. My slides for each lecture are available below:


There are four programming assignments: a Lexical Analyzer, a Parser, a Semantic Analyzer and an Intermediate Code Generator. The four assignments bundled together as a compiler for a custom programming language. An example of the statements supported is shown in the picture below. A GUI is provided to visualize each stage of the compilation process: a token table, a parse tree, a symbol table, and intermediate code; as well as a console (in black background) to display alerts and error messages.

Aditionally, a VM with a GUI is provided to test the execution of the generated intermediate code.

GitHub repository