Compilers (coursera): Difference between revisions
Adamcolton (talk | contribs) |
Adamcolton (talk | contribs) |
||
| Line 52: | Line 52: | ||
==== 05 ==== | ==== 05 ==== | ||
Details of regular expressions. | |||
==== 06 ==== | ==== 06 ==== | ||
Revision as of 16:20, 17 September 2015
From https://class.coursera.org/compilers/lecture/preview
Video Lectures
Intro
01
Compiler and interpreter.
The interpreter takes the program and some data produces output. This would be scripting.
A compiler takes the program and produces and executable. This executable can be run on the data.
- lexical analysis
- parsing
- semantic analysis
- optimization
- code generation
02
Lexing breaks input into tokens. Parsing produces a tree. Semantic analysis checks that the program is correct. Optimization makes it run faster and use less memory, or any number of resource balancing. Code generation produces code, generally machine code.
03
Why are there so many programming languages? Application domains.
Programmer training is the dominant cost for a programming language.
Cool
01
Classroom object orient language.
Writes, compiles and runs a cool program.
02
Factorial example
03
List flattening example.
Lexical Analysis
01
Lexer breaks the code into tokens; string (or lexeme) + class.
Painfully slow example of manual tokenization.
02
Looked at bad classic examples. Lookaheads are sometimes required.
03
Regular languages. Union, concatenation, iteration.
04
Let a set of characters = Σ A language over Σ is a set of strings drawn from Σ
05
Details of regular expressions.