Generic Selections Of Subexpressions
Stc
Date: 2010-05-27
Time: 11:45
Room:
BBL 001
Speaker: Martijn van Steenbergen
Title: Generic Selections of Subexpressions
Abstract
As a compiler matures, more and more features are added. At some point, the
error message are accompanied by position information: where exactly in the
source code did the error occur?
Building that feature is a radical change as it affects large parts of the
compiler pipeline. The AST needs to have fields added for position
information. The parser needs to be adapted to fill these fields when the
nodes are constructed. And functions that consume (parts of) the AST need to
be adapted to either use the position information or explicitly ignore it.
In the thesis we try to turn this design pattern into a library and give the
programmer this functionality for free as much as possible. The result is a
set of utilities that allows the programmer to easily construct and analyze
recursively annotated ASTs and get a mapping from text selection to tree
selection and back for free.
--
MartijnVanSteenbergen - 19 May 2010