Principles of Programming Languages

I am teaching 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 Principles of Programming Languages 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


  1. Course Presentation
  2. Concepts
  3. Lexical Analysis
  4. Lexer Implementation I
  5. Lexer Implementation II
  6. Closing with Lexical Analysis
  7. Syntactic Analysis
  8. Parse Tree, BNF, and Syntax Diagrams
  9. Grammars
  10. Midterm Review
  11. Parser I
  12. Parser II
  13. Error Synchronization
  14. Error Recovery
  15. First and Follow Sets
  16. Chomsky Hierarchy
  17. Semantic Analysis
  18. Type Matching
  19. Conditional Expressions
  20. Intermediate Code
  21. Compilation Process I
  22. Compilation Process II
  23. Compilation Process III
  24. Functional Programming (LISP) I
  25. Functional Programming (LISP) II
  26. Logical Programming (Prolog)
  27. Pointers and References (C/C++)
  28. Final Review


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