CMPS 5223-201 Language Translators and Interpreters

advertisement
CMPS 5223-201 Language Translators and Interpreters
A study of context-free and LR(k) grammars, parsing, lexical analysis, syntax and
semantics, code generation, optimization, and error diagnostics. Students will write a
simple translator. Prerequisite: CMPS 5313 waived
Instructor:
Dr. Catherine Stringfellow
Office Hours: M, W 11am-12pm, 2-3pm, T R 9:30-11am, 2-3:30pm and by appt
Phone:
397-4578
Email:
catherine.stringfellow@mwsu.edu
Web page:
http://cs.mwsu.edu/~stringfe
Course Description
The objectives of the course are to get insight into how compilers work and how they are
implemented. To this end, each student will be required to write a simple compiler. The
course will be organized in the following way:
Introduction
Grammars and Languages
Scanners (lexical analysis)
Top-down parsers
Syntax directed translation and
Intermediate code generation
Bottom-up parsers
Tools for compiler construction
Static representation of data objects (type checking)
Runtime machine structure
Code generation and Optimization
Sec 1, 2.1, 2.6, 3.1, 3.6, 4.1, 5.5
Sec 3.1-3.4, 4.2-4.3, 5.2-5.4
Sec 2.1-2.4
Sec 3.1-3.2, 4.2-4.3
Sec 5.3, 8.1, 8.4
Sec 5.2-5.4
Sec 2.6, 5.5-5.7
Sec 6.3-6.4
Sec 7.1
Sec 8.2-8.5, 8.9
Text: Louden, Kenneth C., Compiler Construction: Principles and Practice, PWS
Publishing Co., 1997. Comment: The course will not follow the text closely; it is to be
used as a valuable reference and for doing homework exercises.
Course Requirements:
Writing a simple compiler that is broken into five programming assignments:
1)
2)
3)
4)
5)
An interpreter for a MINI-MACHINE programming language (due Jan 29) -50
A scanner (due Feb 12) - 75
An LL parser
a. (due Feb 17) - 25
b. (due Mar 3) - 75
A code generator
a. (due Mar 24) - 75
b. (due Apr 7) - 50
An LR parser (due Apr 30) - 100
? Additional assignments, quizzes (due dates on assignments)
Midterm exam on Wednesday, Mar. 5, 2014 (with open books and notes)
Final exam on Monday, May 5, 2014, 5:45-7:45pm (with open books and notes)
Grading Policy:
Homework
Programming Assignments
Midterm
Final
5%
45%
20%
30%
Notes:
1. Points will be deducted for late assignments
2. Keep all your graded works until after you receive your final grade.
3. Policy for late programs and grading available at my web site.
Makeup Exams and Quizzes: There is one midterm and one final exam. The only acceptable reason for missing an
exam is with a valid university excuse (e.g., excuse from the doctor, death in the immediate family, etc.) A makeup
exam will only be given to those students who have a valid excuse. If you know ahead of time that you will miss an
exam, please see me.
Behavior "All students enrolled at the University shall follow the tenets of common decency and acceptable behavior
conducive to a positive learning environment." (See the MSU Student Handbook Standards of Conduct)
ACADEMIC INTEGRITY
Academic integrity is the pursuit of scholarly activity free from fraud and deception and is an educational
objective of this institution. Academic dishonesty includes, but is not limited to, cheating, plagiarizing,
fabricating of information or citations, facilitating acts of academic dishonesty by others, having unauthorized
possession of examinations, submitting work of another person or work previously used without informing the
instructor, or tampering with the academic work of other students (See the MSU Student Handbook Standards of
Conduct)
Plagiarism: Plagiarism will not be tolerated. Any evidence of plagiarism will result in no credit for that assignment for
the first offense. The second offense will result in an F in the course.
Attendance: You are required to attend all class lectures. If you miss a lecture, it is your responsibility to
obtain notes from a fellow student. Office hours are not meant for individual lectures. Attendance will be
taken throughout the semester at the discretion of the instructor. Three unexcused absences may result in
the student being reported to the Dean of Students. Make-up lecture exams will not be permitted without a
valid university excuse. If you are forced to miss an exam, arrangements must be made with the instructor
prior to the exam date.
Class Participation The University expects regular attendance by students in each course. Class
attendance is useful to the student as a means of acquiring knowledge and clarification, and is a prerequisite
for class participation. Class participation is the active engagement in questions and answers, taking part in
analyses of business situations, and contribution of comments in class sessions. (See the MSU Student
Handbook Class Attendance Policy.)
Download