Functional pearl typed quote/antiquote or: Compile-time parsing

Haskell (Peyton Jones, 2003) is often used as a host language for embedding other languages. Typically, the abstract syntax of the guest language is defined by a collection of datatype declarations; parsers and pretty-printers convert between the concrete syntax and its abstract representation. A qu...

সম্পূর্ণ বিবরণ

গ্রন্থ-পঞ্জীর বিবরন
প্রধান লেখক: Hinze, R
বিন্যাস: Journal article
ভাষা:English
প্রকাশিত: 2011
বিবরন
সংক্ষিপ্ত:Haskell (Peyton Jones, 2003) is often used as a host language for embedding other languages. Typically, the abstract syntax of the guest language is defined by a collection of datatype declarations; parsers and pretty-printers convert between the concrete syntax and its abstract representation. A quote/antiquote mechanism permits a tighter integration of the guest language into the host language by allowing one to use phrases in the guest language's concrete syntax. For a simple example, assume that the abstract syntax of the guest language is given by the following datatype of binary trees. © 2011 Cambridge University Press.