language manual (WIP)

parent 30cb6032
language.aux
language.bbl
language.blg
language.idx
language.ilg
language.ind
language.lof
language.log
language.out
language.toc
\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
Version \whyversion{}, November 2013
%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
\textcopyright 2010-2013 University Paris-Sud, CNRS, Inria
\urldef{\urlutcat}{\url}{http://frama-c.com/u3cat/}
\urldef{\urlhilite}{\url}{http://www.open-do.org/projects/hi-lite/}
This work has been partly supported by the `\ahref{\urlutcat}{U3CAT}'
national ANR project (ANR-08-SEGI-021-08\begin{latexonly},
\urlutcat\end{latexonly}) and by the `\ahref{\urlhilite}{Hi-Lite}'
\begin{latexonly}(\urlhilite)\end{latexonly} FUI project of the
System@tic competitivity cluster.
\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.
\begin{center}\framebox{\input{./qualid_bnf.tex}}\end{center}
\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}
\begin{center}\framebox{\input{./constant_bnf.tex}}\end{center}
\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}).
\begin{center}\framebox{\input{./operator_bnf.tex}}\end{center}
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.
\begin{center}\framebox{\input{./label_bnf.tex}}\end{center}
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:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment