Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Preprocessor
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Specializing a language=== One of the unusual features of the [[Lisp programming language|Lisp]] family of languages is the possibility of using macros to create an internal DSL. Typically, in a large [[Lisp programming language|Lisp]]-based project, a module may be written in a variety of such [[minilanguage]]s, one perhaps using a [[SQL]]-based dialect of [[Lisp programming language|Lisp]], another written in a dialect specialized for [[Graphical user interface|GUI]]s or pretty-printing, etc. [[Common Lisp]]'s standard library contains an example of this level of syntactic abstraction in the form of the LOOP macro, which implements an Algol-like minilanguage to describe complex iteration, while still enabling the use of standard Lisp operators. The [[MetaOCaml]] preprocessor/language provides similar features for external DSLs. This preprocessor takes the description of the semantics of a language (i.e. an interpreter) and, by combining compile-time interpretation and code generation, turns that definition into a compiler to the [[OCaml]] programming language—and from that language, either to bytecode or to native code. <!-- Please provide an authoritative cite defining "general purpose(sic) preprocessor" and "general purpose template engine" or else remove this. ==Preprocessors as template engines== Any "general purpose preprocessor", like [[M4 (computer language)|M4]], can be used as a [[template processor|template engine]]. "General purpose preprocessors" and "general purpose template engines" are the same kind of softwares. --~~~ -->
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)