C-Programming-Tools Fourth Lecture: 15th June 2017, noon, LT308
I have just given the fourth and final lecture of my first year lectures on C Tools, building a toolbox of useful tools, and the craft skills to use them effectively, in order to make C programming easier.
This final lecture covers the following single topic:
- Making Code Generator Tools easier - using Parser and Lexer Generator tools: yacc and lex.
Here are the lecture materials (slides and associated examples - of which there are many):
- Here are the full size lecture notes (PDF), ie. with one slide per page.
- Here are the 4-up lecture notes (PDF), ie. with 4 slides per page.
- And here's the C Tools tarball, as a gzipped tar file:
- Download this into your home directory,
- Then extract the contents via:
tar xzf c-tools-lecture4.tgz
- This creates a directory called
- Explore the
c-tools-lecture4directory, I suggest you start with the top level README and Makefile.
Here's a picture that may clarify the general structure of a Code Generator (or indeed a Compiler). The pink components (Lexical Analyser, Parser and Abstract Syntax Tree module) can be automatically generated by Lex, Yacc and Datadec, leaving us to concentrate on writing the Semantic Checker and Code Generator components:
Updated: June 2017
Back to my C Tools Lectures Pages.