language.tex 5.5 KB
Newer Older
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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
\documentclass[a4paper,11pt,twoside,openright]{memoir}

% rubber: module index

%BEGIN LATEX
\usepackage{comment,todonotes}
\newcommand{\ahref}[2]{{#2}}
\excludecomment{htmlonly}
\newenvironment{latexonly}{}{}
%END LATEX

%HEVEA\@addimagenopt{-pdf}

%BEGIN LATEX
% tells memoir style to number subsections
\setsecnumdepth{subsection}
%END LATEX

\usepackage[T1]{fontenc}
\usepackage{lmodern}
%\usepackage{url}
\usepackage[pdftex,colorlinks=true,urlcolor=blue,pdfstartview=FitH]{hyperref}

%BEGIN LATEX
\usepackage{graphicx}
%END LATEX
%HEVEA \newcommand{\includegraphics}[2][2]{\imgsrc{#2}}

\usepackage{listings}
\usepackage{xspace}

%BEGIN LATEX
\setulmarginsandblock{30mm}{30mm}{*}
\setlrmarginsandblock{30mm}{30mm}{*}
\setheadfoot{15pt}{38pt}
\checkandfixthelayout

% placement of figures
\renewcommand{\textfraction}{0.01}
\renewcommand{\topfraction}{0.99}
\renewcommand{\bottomfraction}{0.99}
%END LATEX
\setcounter{topnumber}{4}
\setcounter{bottomnumber}{4}
\setcounter{totalnumber}{8}

%HEVEA \newstyle{table.lstframe}{width:100\%;border-width:1px;}

% \usepackage[toc,nonumberlist]{glossaries}
% \makeglossaries

% \usepackage{glossary}
% \makeglossary
% \glossary{name={entry name}, description={entry description}}

% for ocamldoc generated pages
%\usepackage{ocamldoc}
%\let\tt\ttfamily
%\let\bf\bfseries

\usepackage{ifthen}
\input{./macros.tex}
\input{./version.tex}
\let\of\texttt

\makeindex

%HEVEA\title{}

\begin{document}
\sloppy
%BEGIN LATEX
\hbadness=5000
%END LATEX

\thispagestyle{empty}

\begin{center}

%BEGIN LATEX
\rule\textwidth{0.8mm}
%END LATEX

\vfill

{
%BEGIN LATEX
\fontsize{40}{40pt}\selectfont
%END LATEX
%HEVEA \Huge
\bfseries\sffamily WhyML \\[1em] Syntax and Semantics}

\vfill

%BEGIN LATEX
\rule\textwidth{0.8mm}
%END LATEX

\vfill

% \todo{NE PAS DISTRIBUER TANT QU'IL RESTE DES TODOS}

%BEGIN LATEX
\begin{LARGE}
%END LATEX
MARCHE Claude's avatar
MARCHE Claude committed
106
  Version \whyversion{}
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
%BEGIN LATEX
\end{LARGE}
%END LATEX

\vfill

%BEGIN LATEX
\begin{Large}
%END LATEX
  \begin{tabular}{c}
  Fran\c{c}ois Bobot$^{1,2}$ \\
  Jean-Christophe Filli\^atre$^{1,2}$  \\
  Claude March\'e$^{2,1}$ \\
  Guillaume Melquiond$^{2,1}$\\
  Andrei Paskevich$^{1,2}$
\end{tabular}
%BEGIN LATEX
\end{Large}
%END LATEX
\vfill

\begin{flushleft}

\begin{tabular}{l}
$^1$ LRI, CNRS \& University Paris-Sud, Orsay, F-91405 \\
$^2$ Inria Saclay -- \^Ile-de-France, Palaiseau, F-91120
\end{tabular}

%BEGIN LATEX
\bigskip
%END LATEX

MARCHE Claude's avatar
MARCHE Claude committed
139
  \textcopyright 2010-2014 University Paris-Sud, CNRS, Inria
140 141 142

\urldef{\urlutcat}{\url}{http://frama-c.com/u3cat/}
\urldef{\urlhilite}{\url}{http://www.open-do.org/projects/hi-lite/}
MARCHE Claude's avatar
MARCHE Claude committed
143 144 145 146 147 148 149 150 151
\urldef{\urlbware}{\url}{http://bware.lri.fr/}

This work has been partly supported by the `\ahref{\urlutcat}{U3CAT}'
national ANR project (ANR-08-SEGI-021-08\begin{latexonly},
  \urlutcat\end{latexonly}), the `\ahref{\urlhilite}{Hi-Lite}'
\begin{latexonly}(\urlhilite)\end{latexonly} FUI project of the
System@tic competitivity cluster, and the `\ahref{\urlbware}{BWare}'
ANR project (ANR-12-INSE-0010\begin{latexonly},
  \urlbware\end{latexonly}).
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180

\end{flushleft}
\end{center}

\newpage
\tableofcontents

\chapter{Lexical conventions}

\whyml\ assumes a uni-byte encoding of input files, such as ASCII or
Latin-1.

\paragraph{Comments.}
Comments are enclosed by \texttt{(*} and \texttt{*)} and can be nested.
The sequence of characters \of{(*)} is not considered as the beginning
of a comment.

\paragraph{Strings.}
Strings are enclosed in double quotes (\verb!"!). Double quotes can be
inserted in strings using the backslash character (\verb!\!).
In the following, strings are referred to with the non-terminal
\nonterm{string}{}.

\todo{escape sequences for strings}

\paragraph{Identifiers.} The syntax distinguishes lowercase and
uppercase identifiers and, similarly, lowercase and uppercase
qualified identifiers.

181
\begin{center}\framebox{\input{./generated/qualid_bnf.tex}}\end{center}
182 183 184 185 186 187 188 189

\paragraph{Constants.}
The syntax for constants is given in Figure~\ref{fig:bnf:constant}.
Integer and real constants have arbitrary precision.
Integer constants may be given in base 16, 10, 8 or 2.
Real constants may be given in base 16 or 10.

\begin{figure}
190
\begin{center}\framebox{\input{./generated/constant_bnf.tex}}\end{center}
191 192 193 194 195 196 197
  \caption{Syntax for constants.}
\label{fig:bnf:constant}
\end{figure}

\paragraph{Operators.}
Prefix and infix operators are built from characters organized in four
categories (\textsl{op-char-1} to \textsl{op-char-4}).
198
\begin{center}\framebox{\input{./generated/operator_bnf.tex}}\end{center}
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
Infix operators are classified into 4 categories, according to the
characters they are built from:
\begin{itemize}
\item level 4: operators containing only characters from
\textit{op-char-4};
\item level 3: those containing
 characters from \textit{op-char-3} or \textit{op-char-4};
\item level 2: those containing
 characters from \textit{op-char-2}, \textit{op-char-3} or
 \textit{op-char-4};
\item level 1: all other operators (non-terminal \textit{infix-op-1}).
\end{itemize}

\paragraph{Labels.} Identifiers, terms, formulas, program expressions
can all be labeled, either with a string, or with a location tag.
214
\begin{center}\framebox{\input{./generated/label_bnf.tex}}\end{center}
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
A location tag consists of a file name, a line number, and starting
and ending characters.

\chapter{}

\bibliographystyle{abbrv}
\bibliography{manual}
%\input{biblio-demons}

\cleardoublepage
\listoffigures
\cleardoublepage
\printindex

\end{document}

%%% Local Variables:
%%% mode: latex
%%% TeX-PDF-mode: t
%%% TeX-master: t
%%% compile-command: "rubber -d language"
%%% ispell-local-dictionary: "american"
%%% End: