Presentation is loading. Please wait.

Presentation is loading. Please wait.

Compiler Structures 0. Preliminaries

Similar presentations


Presentation on theme: "Compiler Structures 0. Preliminaries"— Presentation transcript:

1 Compiler Structures 0. Preliminaries
, Semester 2, 0. Preliminaries Please ask questions Who I am: Andrew Davison CoE, Info. Eng. Research Lab (WiG Lab) Objective to give some background on the course

2 Overview 1. Why Study Compilers? 2. Course Objectives 3. Prerequisites 4. Meeting Time / Location 5. Workload 6. Course Materials 7. Further Information

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 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 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 Be able to write LL(1) and LALR(1) grammars (for new languages).
Be familiar with code generation. Be familiar with virtual machines.

7 Main Topics Lexical Analysis (lex) Syntax Analysis Attribute Grammars
top-down, bottom-up (yacc) Attribute Grammars Semantic Analysis (parse trees) Intermediate Code Generation for expressions and loops

8 3. Prerequistes You must have passed “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 4. Meeting Time / Location
?? ??– ?? ?? 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 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 5. Workload (% of total score)
4 Exercises: 50% total Exercise 1 (lexical), week 4, 10% Exercise 2 (syntax), week 7, 10% Exercise 3 (semantics), week 13, 15% Exercise 4 (parse trees), week 15, 15% continued

12 Mid-term exam: 25% (2 hours)
week 9 Final exam: 25% (3 hours) weeks 17-18

13 6. Course Materials I will only hand out the exercises.
Print out and BRING TO CLASS. I will only hand out the exercises. All the handouts (and other materials, such as code examples) will be placed on-line at Software.coe/Compilers/

14 Textbooks In our library Compilers: Principles, Techniques and Tools by Aho, Sethi, and Ullman Addison-Wesley Lex and Yacc by Levine, Mason, and Brown O'Reilly; 2nd edition

15 7. Further Information awesome-compilers Let's Build a Compiler
list of learning materials, tools, frameworks, technologies and code projects awesome-compilers Let's Build a Compiler by Jack Crenshaw a good, less technical introduction to compiler construction


Download ppt "Compiler Structures 0. Preliminaries"

Similar presentations


Ads by Google