Abstract

This paper extends Definite Clause Grammars (DCGs) by a metaprogramming facility which supports sequences of items (terminals, nonterminals, Prolog goals, etc.) as values of variables. Variables may be employed themselves as a new sort of item in the right-hand side of a rule, in order to activate the respective item sequences they are instantiated to. In addition, so-called assignments render it possible to save the terminal string derived from an item (or even from an item sequence) in a variable for later manipulation, or to unify it with another string. The new approach, called Assignment Metagrammars (AMGs), is compared with H. Abramson’s meta-nonterminals and the Discontinuous Grammars (DGs) or Gapping Grammars (GGs) proposed by V. Dahl and H. Abramson. AMGs are implemented by a compiler that translates them into efficient Prolog programs.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.