Generalized Type-BasedDisambiguationOfMetaProgramsWithConcreteObjectSyntax
Stc
Date: 2005-09-22
Time: 11:45
Room: BBL room 471
Title: Generalized Type-Based Disambiguation of Meta Programs with Concrete Object Syntax
Abstract
In meta programming with concrete object syntax, object-level programs
are composed from fragments written in concrete syntax. The use of small
program fragments in such quotations and the use of meta-level expressions within
these fragments (anti-quotation) often leads to ambiguities. This problem is
usually solved through explicit disambiguation, resulting in considerable syntactic
overhead. A few systems manage to reduce this overhead by using type
information during parsing. Since this is hard to achieve with traditional parsing
technology, these systems provide specific combinations of meta and object languages,
and their implementations are difficult to reuse. In this talk, we generalize
these approaches and present a language independent method for introducing
concrete object syntax without explicit disambiguation. The method uses scannerless
generalized-LR parsing to parse meta programs with embedded objectlevel
fragments, which produces a forest of all possible parses. This forest is
reduced to a tree by a disambiguating type checker for the meta language. To
validate our method we have developed embeddings of several object languages
in Java, including AspectJ and Java itself.