This module is a self-contained component of CS471, Programming Language Structure I. It can be completed at your own pace during the first half of the course. It uses the relevant chapters from Sebesta's book, as well worked examples and other references. The self-test material is gathered into one place here. The answers are here.
To learn the basics of formal syntax definitions of programming languages: BNF (Backus Naur Form), EBNF (Extended BNF) and syntax diagrams. To be able to write a simple grammar in any style given a specification. To be able to alter a grammar to meet a new specification. To be able to translate a simple grammar between BNF, EBNF and syntax diagrams. To draw a syntax tree for a given grammar and a sample token stream.
Follow the sequence of pages given in the contents section above. Answer the self-test at the end of each section.