翻訳と辞書
Words near each other
・ Camouflage (Rufus album)
・ Camouflage (Sonny Condell album)
・ Camouflage (Stan Ridgway song)
・ Camouflage Centre Europe
・ Camouflage grouper
・ Camouflage Heart
・ Camouflage Nights
・ Camouflage passport
・ Camlistore
・ Camlock
・ Camlock (electrical)
・ Camlock (fluid fitting)
・ Camlough
・ Camlough Fault
・ Camlough Rovers F.C.
Camlp4
・ Camm
・ CAMM (missile family)
・ Camm Morton
・ Camm, Virginia
・ Camma
・ Cammachmore
・ Cammachmore Bay
・ Cammack
・ Cammack Village, Arkansas
・ Cammack, Indiana
・ Cammaerts
・ Cammag
・ Cammal, Pennsylvania
・ Cammarano v. United States


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Camlp4 : ウィキペディア英語版
Camlp4
Camlp4 is a software system for writing extensible parsers for programming languages. It provides a set of OCaml libraries that are used to define grammars as well as loadable syntax extensions of such grammars. Camlp4 stands for Caml Preprocessor and Pretty-Printer and one of its most important applications is the definition of domain-specific extensions of the syntax of OCaml.
Camlp4 is part of the official OCaml distribution which is developed at the INRIA. Its original author is Daniel de Rauglaudre. OCaml version 3.10.0, released in May 2007, introduced a significantly modified and backwards-incompatible version of Camlp4. De Rauglaudre maintains a separate backwards-compatible version, which has been renamed Camlp5. All of the examples below are for Camlp5 or the previous version of Camlp4 (versions 3.09 and prior).
The current version of camlp4 doesn't yet have a manual. The "Camlp4 manual" is from 2003, and is not compatible with present version.
== Concrete and abstract syntax ==

A Camlp4 preprocessor operates by loading a collection of compiled modules which define a parser as well as a pretty-printer: the parser converts an input program into an internal representation. This internal representation constitutes the abstract syntax tree (AST). It can be output in a binary form, e.g. it can be passed directly to one of the OCaml compilers, or it can be converted back into a clear text program. The notion of ''concrete syntax'' refers to the format in which the ''abstract syntax'' is represented.
For instance, the OCaml expression (1 + 2) can also be written ((+) 1 2) or (((+) 1) 2). The difference is only at the level of the concrete syntax, since these three versions are equivalent representations of the same abstract syntax tree. As demonstrated by the definition of a revised syntax for OCaml, the same programming language can use different concrete syntaxes. They would all converge to an abstract syntax tree in a unique format that a compiler can handle.
The abstract syntax tree is at the center of the syntax extensions, which are in fact OCaml programs. Although the definition of grammars must be done in OCaml, the parser that is being defined or extended is not necessarily related to OCaml, in which case the syntax tree that is being manipulated is not the one of OCaml. Several libraries are provided which facilitate the specific manipulation of OCaml syntax trees.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Camlp4」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.