blob: 7bbd51ce0526a0fba03098fd6609aa3546d93928 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
\chapter{The OCaml language} \label{c:refman}
%HEVEA\cutname{language.html}
%better html output that way, sniff.
%HEVEA\subsection*{ss:foreword}{Foreword}
%BEGIN LATEX
\section*{s:foreword}{Foreword}
%END LATEX
This document is intended as a reference manual for the OCaml
language. It lists the language constructs, and gives their precise
syntax and informal semantics. It is by no means a tutorial
introduction to the language. A good
working knowledge of OCaml is assumed.
No attempt has been made at mathematical rigor: words are employed
with their intuitive meaning, without further definition. As a
consequence, the typing rules have been left out, by lack of the
mathematical framework required to express them, while they are
definitely part of a full formal definition of the language.
\subsection*{ss:notations}{Notations}
The syntax of the language is given in BNF-like notation. Terminal
symbols are set in typewriter font (@'like' 'this'@).
Non-terminal symbols are set in italic font (@like that@).
Square brackets @[\ldots]@ denote optional components. Curly brackets
@{\ldots}@ denotes zero, one or several repetitions of the enclosed
components. Curly brackets with a trailing plus sign @{{\ldots}}@
denote one or several repetitions of the enclosed components.
Parentheses @(\ldots)@ denote grouping.
%HEVEA\cutdef{section}
\input{lex}
\input{values}
\input{names}
\input{types}
\input{const}
\input{patterns}
\input{expr}
\input{typedecl}
\input{classes}
\input{modtypes}
\input{modules}
\input{compunit}
%HEVEA\cutend
|