Sunday, 11 March 2012

Specializing a language

One of the abnormal appearance of the Lisp ancestors of languages is the achievability of application macros to actualize an centralized Domain-Specific Programming Language. Typically, in a ample Lisp-based project, a bore may be accounting in a array of such minilanguages, one conceivably application a SQL-based accent of Lisp, addition accounting in a accent specialized for GUIs or pretty-printing, etc. Common Lisp's accepted library contains an archetype of this akin of syntactic absorption in the anatomy of the LOOP macro, which accouterments an Algol-like minilanguage to call circuitous iteration, while still enabling the use of accepted Lisp operators.

The MetaOCaml preprocessor/language provides agnate appearance for alien Domain-Specific Programming Languages. This preprocessor takes the description of the semantics of a accent (i.e. an interpreter) and, by accumulation compile-time estimation and cipher generation, turns that analogue into a compiler to the OCaml programming language—and from that language, either to bytecode or to built-in code.

No comments:

Post a Comment