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
\input{preambule}
\input{version}
\usepackage[
type={CC},
modifier={by},
version={4.0},
]{doclicense}
\title{The Lustre V6 Grammar Rules}
\author{Erwan Jahier, Pascal Raymond, Nicolas Halbwachs}
\date{
Software Version: \version{}
(\versiondate) }
\begin{document}
%\maketitlepage
\maketitle
\doclicenseThis
\newpage
\newcommand{\lsx}[1]{{ \bf $\langle$\mbox{\it \hyperlink{#1}{#1}$\rangle$}}}
\newcommand{\lsxDef}[1]{{\bf $\langle$\mbox{\it \hypertarget{#1}{#1}$\rangle$}}}
\newcommand{\mygrammar}[1]{
% \begin{grammarrule}
\begin{longtable}{lrl}
#1
\end{longtable}
% \end{grammarrule}
}
\input{lv6parser}
We recall that grammar rules are given using an extended BNF notation, where
non-terminals are written \lsxDef{like\_this} and terminals \lx{like
that}. All non-terminals (should) have pdf internal links to ease the reading.
\begin{itemize}
\item
One-line comments start with \key{--} and stop at the the end of the
line.
\item
Multi-line comments start with '\key{(*}' and end at the next following
'\key{*)}' ('\key{/*}' and '\key{*/}' also work).
Multi-line comments cannot be nested.
\item \bnfleftident{TK\_IDENT} stands for identifier: \bnftoken{[\_a-zA-Z][\_a-zA-Z0-9]*}
\item \bnfleftident{TK\_LONGIDENT} stands for pointed (or long)
identifier, that is, two identifiers separated by a double colon:
\bnfleftident{TK\_IDENT}\bnftoken{::}\bnfleftident{TKIDENT}
% \bnftoken{[\_a-zA-Z][\_a-zA-Z0-9]*}\bnftoken{::}\bnftoken{[\_a-zA-Z][\_a-zA-Z0-9]*} ,
\end{itemize}
% so that links remain inside the appendix
\gdef\bnfleftident#1{%
\bf $\langle$\mbox{\it \hypertarget{alt#1}{#1}$\rangle$}
}%
\gdef\bnfrightident#1{%
{\bf $\langle$\mbox{\it \hyperlink{alt#1}{#1}$\rangle$}}
}%
\ebnftable
\end{document}