Generalized type-based disambiguation of meta programs with concrete object syntax

M. Bravenboer, R. Vermaas, J.J. Vinju, E. Visser

    Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

    29 Citations (Scopus)

    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 paper, 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 object-level 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.
    Original languageEnglish
    Title of host publicationProceedings of the 4th International Conference on Generative Programming and Component Engineering , GPCE 2005, September 29 - October 1, 2005. Tallinn, Estonia
    EditorsR. Glück, M. Lowry
    Place of PublicationBerlin
    PublisherSpringer
    Pages157-172
    ISBN (Print)978-3-540-29138-1
    DOIs
    Publication statusPublished - 2005
    Event4th International Conference on Generative Programming and Component Engineering (GPCE 2005) - Tallin, Estonia
    Duration: 29 Sept 20051 Oct 2005
    Conference number: 4

    Publication series

    NameLecture Notes in Computer Science
    Volume3676
    ISSN (Print)0302-9743

    Conference

    Conference4th International Conference on Generative Programming and Component Engineering (GPCE 2005)
    Abbreviated titleGPCE 2005
    Country/TerritoryEstonia
    CityTallin
    Period29/09/051/10/05

    Fingerprint

    Dive into the research topics of 'Generalized type-based disambiguation of meta programs with concrete object syntax'. Together they form a unique fingerprint.

    Cite this