Island grammar-based parsing using GLL and Tom

A. Afroozeh, J.-C. Bach, M.G.J. Brand, van den, A. Johnstone, M.W. Manders, P.-E. Moreau, E. Scott

    Onderzoeksoutput: Hoofdstuk in Boek/Rapport/CongresprocedureConferentiebijdrageAcademicpeer review

    3 Citaten (Scopus)
    2 Downloads (Pure)

    Samenvatting

    Extending a language by embedding within it another language presents significant parsing challenges, especially if the embedding is recursive. The composite grammar is likely to be nondeterministic as a result of tokens that are valid in both the host and the embedded language. In this paper we examine the challenges of embedding the Tom language into a variety of general-purpose high level languages. Tom provides syntax and semantics for advanced pattern matching and tree rewriting facilities. Embedded Tom constructs are translated into the host language by a preprocessor, the output of which is a composite program written purely in the host language. Tom implementations exist for Java, C, C#, Python and Caml. The current parser is complex and difficult to maintain. In this paper, we describe how Tom can be parsed using island grammars implemented with the Generalised LL (GLL) parsing algorithm. The grammar is, as might be expected, ambiguous. Extracting the correct derivation relies on our disambiguation strategy which is based on pattern matching within the parse forest. We describe different classes of ambiguity and propose patterns for resolving them.
    Originele taal-2Engels
    TitelSoftware Language Engineering (5th International Conference, SLE 2012, Dresden, Germany, September 26-28, 2012, Revised Selected Papers)
    RedacteurenK. Czarnecki, G. Hedin
    Plaats van productieBerlin
    UitgeverijSpringer
    Pagina's224-243
    ISBN van geprinte versie978-3-642-36088-6
    DOI's
    StatusGepubliceerd - 2013
    Evenement5th International Conference on Software Language Engineering (SLE 2012) - Dresden, Duitsland
    Duur: 26 sep 201228 sep 2012
    Congresnummer: 5
    http://www.sleconf.org/2012/

    Publicatie series

    NaamLecture Notes in Computer Science
    Volume7745
    ISSN van geprinte versie0302-9743

    Congres

    Congres5th International Conference on Software Language Engineering (SLE 2012)
    Verkorte titelSLE 2012
    Land/RegioDuitsland
    StadDresden
    Periode26/09/1228/09/12
    Ander5th International Conference on Software Language Engineering
    Internet adres

    Vingerafdruk

    Duik in de onderzoeksthema's van 'Island grammar-based parsing using GLL and Tom'. Samen vormen ze een unieke vingerafdruk.

    Citeer dit