Camlp4 - Reference Manual
version 3.02
Daniel de Rauglaudre
30 July 2001
Copyright © 2001 Institut National de Recherche en Informatique et Automatique
Introduction
Camlp4
Camlp4 predefined files
Preprocessing OCaml
User syntax modifications
Quotations
Syntax
Creating a quotation expander
Antiquotations
Errors
Predefined quotation expanders
Grammars
Grammars and entries
Extension
Parsed language
Deletion
Writing a lexer
Syntax extensions
The abstract syntax tree
Extending the language
Examples of language extensions
Redefining the whole syntax
The Revised syntax
Phrases
Imperative constructions
Tuples and lists
Irrefutable patterns
Constructions with matching
Mutables and assignment
Types
Modules
Objects
Miscellaneous
Streams and parsers
Other extensions
Extensible functions
Functional streams
Camlp4 library modules
Module
MLast
: abstract syntax tree
Module
Grammar
: extensible grammars
Module
Extfun
: extensible functions
Module
Pcaml
: language grammar, entries and printers.
Module
Plexer
: a lexical analyzer
Module
Quotation
: quotation operations
Module
Stdpp
: standard definitions
Module
Token
: lexers for Camlp4 grammars
Quotations for creating abstract syntax trees
General rules
Quotation
expr
Quotation
patt
Quotation
ctyp
Quotation
sig_item
Quotation
str_item
Quotation
module_type
Quotation
module_expr
This document was translated from L
A
T
E
X by
H
E
V
E
A and H
A
C
H
A
.