Compiler Construction Seminar (Astoria OR, Sept 09)

Walter Bright <>
Fri, 24 Jul 2009 23:02:47 -0700

          From comp.compilers

Related articles
Compiler Construction Seminar (Astoria OR, Sept 09) (Walter Bright) (2009-07-24)
| List of all articles for this month |

From: Walter Bright <>
Newsgroups: comp.compilers
Date: Fri, 24 Jul 2009 23:02:47 -0700
Organization: Digital Mars
Keywords: courses
Posted-Date: 26 Jul 2009 17:42:44 EDT

On September 20-22 there's a Compiler Construction seminar in Astoria,
Oregon. It will cover practical techniques in building a compiler,
from lexing to code generation.

There will be 9 sessions:

Introduction To Compilers
Walter Bright (1.5 hrs)

This introduces the process of how source code is transformed into an
executable image. The roles of each of the tools involved - assembler,
compiler, linker, librarian and debugger is explained. The compiler is
then opened up and its various phases, subsystems and their
interrelationships are introduced.

Lexing and Parsing
Walter Bright (1.5 hrs)

Lexing is the process of converting the source text into tokens.
Although lexing is conceptually straightforward, there are a lot of
wrong and inefficient ways to write one. The first part of this session
will show the right way to build a simple and very fast lexer. The
second part will show how the token stream is then parsed by the
compiler to produce abstract syntax trees.

Semantic Analysis
Walter Bright (1.5 hrs)

Semantic analysis takes the abstract syntax tree output of the parser
and deduces the meaning of it. This requires the creation of symbol
tables, strategies for organizing the semantic information, and type
checking. This stage figures out all the declarations, control flow,
expands templates, and inlines functions.

Intermediate Representation
Walter Bright (1.5 hrs)

The intermediate representation is the end result of semantic analysis
of the source program. The optimization and code generation phases
operate on the intermediate representation. Careful selection of the
intermediate representation will determine how easy it is to do
optimization and how effective those optimizations can be.

Walter Bright (1.5 hrs)

Interpreters are programs that execute the intermediate code directly
without transforming it into native code. Some of the most widely used
languages today, such as Perl, Python, Ruby, and Javascript, are
interpreted languages. The general strategy of an interpreter is
presented, along with examination of how a Javascript interpreter works.

Walter Bright (1.5 hrs)

Optimization is the transformation of the intermediate code into
different intermediate code that will presumably translate into faster
executable code. Basic optimizations are introduced. The construction of
directed acyclic graphs and data flow equations are covered, along with
how to use the results to improve the code.

Code Generation
Walter Bright (1.5 hrs)

Code generators transform the intermediate code into native executable
code. This covers function prolog and epilog, instruction selection,
register allocation, peephole optimization.

Special Topics
Walter Bright (1.5 hrs)

As languages have gotten more advanced, compilers need to do more than
just generate functions. This provides an introduction to how features
like closures, exception handling, thread local storage, and position
independent code are dealt with.

Building a Compiler for .NET
Cristian Vlasceanu (1.0 hrs)

Walter Bright
Digital Mars
Free C, C++, and D programming language compilers

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.