Download presentation
Presentation is loading. Please wait.
Published byOscar Brooks Modified over 9 years ago
1
241-437 Compilers: Prelim/0 1 Compiler Structures Objective – –to give some background on the course 241-437, Semester 1, 2011-2012 Who I am: Andrew Davison CoE, Info. Eng. Research Lab (WiG Lab) ad@fivedots.coe.psu.ac.th 0. Preliminaries Please ask questions
2
241-437 Compilers: Prelim/0 2 Overview 1.Why Study Compilers? 2. Course Objectives 3.Prerequisites 4. Meeting Time / Location 5. Workload 6. Course Materials 7.Further Information
3
241-437 Compilers: Prelim/0 3 1. Why Study Compilers? Compilers use techniques from many areas of Comp. Eng. These include: – –data structures & algorithms – –formal languages (e.g. REs, grammars) – –computer architecture – –programming language design
4
241-437 Compilers: Prelim/0 4 Compiler-related Tools are Everywhere Editors (syntax highlighting) Small languages (e.g. game scripting) Pretty printers (e.g. doxygen) Static checkers (e.g. lint) Text formatters (e.g. LaTeX) Silicon compilers (e.g. VHDL) Query interpreters/compilers (databases)
5
241-437 Compilers: Prelim/0 5 2. Course Objectives By the end of the course, a student will: Know how to build a compiler for a (very simplified) C-like programming language. Know how to use compiler construction tools, such as generators for scanners and parsers. continued
6
241-437 Compilers: Prelim/0 6 Be able to write LL(1) and LALR(1) grammars (for new languages). Be familiar with code generation. Be familiar with virtual machines.
7
241-437 Compilers: Prelim/0 7 Main Topics Lexical Analysis (lex) Syntax Analysis – –top-down, bottom-up (yacc) Attribute Grammars Semantic Analysis (parse trees) Intermediate Code Generation – –for expressions and loops
8
241-437 Compilers: Prelim/0 8 3. Prerequistes You must have passed 241-207 “Computer Programming Techniques” or something similar – –this subject requires you to have a good knowledge of C/C++ – –all the code examples are in C, on Linux
9
241-437 Compilers: Prelim/0 9 4. Meeting Time / Location Monday15:00 – 16:30A201 Wednesday15:00 – 16:30A201 In the first 1-2 weeks of semester, you can ask me to change the meeting times – –a majority of the class must agree
10
241-437 Compilers: Prelim/0 10 Non-Attendence Penalty I may take registration at the start of a class. If someone is not there, they lose 1% (unless they have a good excuse). A maximum of 10% can be lost – –deducted from your final mark
11
241-437 Compilers: Prelim/0 11 5. Workload (% of total score) 4 Exercises:40% total – –Exercise 1 (lexical), week 4, 10% – –Exercise 2 (syntax), week 7, 10% – –Exercise 3 (semantics), week 14, 10% – –Exercise 4 (parse trees), week 16, 10% continued
12
241-437 Compilers: Prelim/0 12 Mid-term exam:25%(2 hours) Mid-term exam:25%(2 hours) –30th July to 7th August (week 9) Final exam:35%(3 hours) Final exam:35%(3 hours) –3rd – 14th Oct. (weeks 18-19)
13
241-437 Compilers: Prelim/0 13 6. Course Materials I will only hand out the exercises. All the handouts (and other materials, such as code examples) will be placed on-line at http://fivedots.coe.psu.ac.th/ Software.coe/Compilers/ Print out and BRING TO CLASS.
14
241-437 Compilers: Prelim/0 14 Textbooks Compilers: Principles, Techniques and Tools by Aho, Sethi, and Ullman Addison-Wesley Lex and Yacc by Levine, Mason, and Brown O'Reilly; 2nd edition In our library
15
241-437 Compilers: Prelim/0 15 7. Further Information Let's Build a Compiler – –by Jack Crenshaw – –a good, less technical introduction to compiler construction – –http://compilers.iecc.com/crenshaw/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.