CST 8152 Compilers - Assignment #2Due: 12 noon Friday, January 31, 1997
This assignment builds on Assignment #1. It gives practice designing and implementing Transition Tables to recognize tokens, and is an opportunity to improve your C coding style.
1. Design and draw a Deterministic Finite Automaton (DFA), composed of state circles and edges representing state transitions on input characters, that recognizes the C-style strings described in Assignment #1.
2. Turn the above DFA into a two-dimensional Transition Table of states vs. input characters.
3. Design, write, and thoroughly test a C Language program that uses the above Transition Table to recognize the C-style strings described in Assignment #1. Make sure both the new and the old programs recognize the same set of strings! Use #define statements to give the states meaningful names. Part of your evaluation is based on the thoroughness of your program testing.
The deliverables for this assignment are as follows:
3. The fully documented source listing of your new C program (including your own .h files).Programming must follow the Algonquin standard guidelines.
4. A description of your testing strategy, possibly including sample input test file(s) showing the test cases you selected, and possibly including generated output for some of the input test files. Your task is to convince the reader that your program handles all forms of input correctly and without faulting.
1. The DFA and Transition Table are due at the start of your Lab time this week.
2. The remaining deliverables are due in the Ian Allen assignment box before Noon, Friday, January 31.
Please fasten together firmly all parts of your assignment deliverables so that no parts will be lost.
(An excellent strategy is to put all your deliverables into a labelled full-size brown envelope.)
Identify your assignments:
Make obvious on the outside of your assignment these four things (type or print clearly):
2. your student ID number,
3. your weekly Lab time and section number (011, 012, 013 or 014), and
4. the course number: CST8152.
Assignments are marked for clarity and simplicity as well as correctness. A clear program that doesnt quite work but can be understood and fixed is more useful than a working program that cant be modified because it is unreadable, incomprehensible, and consequently unmaintainable.
Late assignments are handled according to the policy given in the course outline.