Prolog’s support for dynamic programming, meta programming and text processing using context free... more Prolog’s support for dynamic programming, meta programming and text processing using context free grammars make the language highly suitable for defining domain specific languages (DSL) as well as analysing, refactoring or generating expression states in other (programming) languages. Well known DSLs are the DCG (Definite Clause Grammar) notation and constraint languages such as CHR. These extensions use Prolog operator declarations and the {. . . } notation to realise a good syntax. When external languages, such as HTML, SQL or JavaScript enter the picture, operators no longer satisfy for embedding snippets of these languages into a Prolog source file. In addition, Prolog has poor support for quoting long text fragments.
Haskell introduced quasi quotations to resolve this problem. In this paper we ‘ported’ the Haskell mechanism for quasi quoting to Prolog. We show that this can be done cleanly and that quasi quoting can solve the above mentioned problems.
Prolog’s support for dynamic programming, meta programming and text processing using context free... more Prolog’s support for dynamic programming, meta programming and text processing using context free grammars make the language highly suitable for defining domain specific languages (DSL) as well as analysing, refactoring or generating expression states in other (programming) languages. Well known DSLs are the DCG (Definite Clause Grammar) notation and constraint languages such as CHR. These extensions use Prolog operator declarations and the {. . . } notation to realise a good syntax. When external languages, such as HTML, SQL or JavaScript enter the picture, operators no longer satisfy for embedding snippets of these languages into a Prolog source file. In addition, Prolog has poor support for quoting long text fragments.
Haskell introduced quasi quotations to resolve this problem. In this paper we ‘ported’ the Haskell mechanism for quasi quoting to Prolog. We show that this can be done cleanly and that quasi quoting can solve the above mentioned problems.
Uploads
Papers by Michael Hendricks
Haskell introduced quasi quotations to resolve this problem. In this paper we ‘ported’ the Haskell mechanism for quasi quoting to Prolog. We show that this can be done cleanly and that quasi quoting can solve the above mentioned problems.
Haskell introduced quasi quotations to resolve this problem. In this paper we ‘ported’ the Haskell mechanism for quasi quoting to Prolog. We show that this can be done cleanly and that quasi quoting can solve the above mentioned problems.