|
q_MLast.cmo
'' in Camlp4 library directory provides
some quotations expanders to create abstract syntax tree nodes using a
concrete syntax.MLast
''
provided in the library, but not documented, for the normal usage is
to use these quotations.
|
antiquotation ::= $ { name : } string $ |
name ::= identifier |
$
.
|
Ast.expr
. The basic nodes are:
<:expr< $e1$ . $e2$ >>
: access in records and in modules.
<:expr< $anti:e$ >>
: location node for Ast antiquotations
(temporary node).
<:expr< $e1$ $e2$ >>
: application.
<:expr< $e1$ .( $e2$ ) >>
: array access.
<:expr< [| $list:el$ |] >>
: array.
<:expr< $e1$ := $e2$ >>
: assignment.
<:expr< $chr:c$ >>
: (escaped) character constant.
<:expr< $flo:s$ >>
: float constant.
<:expr< for $s$ = $e1$ $to:b$ $e2$ do { $list:el$ } >>
: for loop.
<:expr< fun [ $list:pwel$ ] >>
: function.
<:expr< if $e1$ then $e2$ else $e3$ >>
: if
statement.
<:expr< $int:s$ >>
: integer constant.
<:expr< let $rec:b$ $list:pel$ in $e$ >>
:
let
statement.
<:expr< ( $lid:s$ >>
: identifier starting with a
lowercase letter.
<:expr< match $e$ with [ $list:pwel$ ] >>
:
match
statement.
<:expr< { $list:eel$ } >>
: record.
<:expr< do { $list:el$ } >