AID: An Alternative Implementation of DCGs
1986 (English)In: New generation computing, ISSN 0288-3635, E-ISSN 1882-7055, Vol. 4, no 4, 383-399 p.Article in journal (Refereed) Published
This paper presents an alternative approach to implementation of DCGs. In contrast to the standard implementation we use the well-known bottom-up SLR(1)-parsing technique. An experimental system, AID, based on this technique is presented and discussed. The aim of this work is twofold. Firstly, we describe an alternative principle of implementation of DCGs, which makes it possible to cope with left-recursive DCGs and to avoid unnecessary backtracking when parsing. Secondly, we demonstrate that Prolog can be used for implementation of table driven parsers that generalize deterministic LR(k)-parsing techniques to the case of ambiguous grammars. The parsers generated by our system are deterministic whenever the submitted grammar is SLR(1). Otherwise the shift/reduce or reduce/reduce conflicts are stored in the generalized table and are used as Prolog backtrack points.
Place, publisher, year, edition, pages
Springer , 1986. Vol. 4, no 4, 383-399 p.
IdentifiersURN: urn:nbn:se:liu:diva-67130DOI: 10.1007/BF03037391OAI: oai:DiVA.org:liu-67130DiVA: diva2:407566