Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-v6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
lustre-v6
Commits
397b7835
Commit
397b7835
authored
9 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
Fixing and updating the lv6 manual.
parent
d290481f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lv6-ref-man/Makefile
+16
-4
16 additions, 4 deletions
lv6-ref-man/Makefile
lv6-ref-man/lustokens
+4
-0
4 additions, 0 deletions
lv6-ref-man/lustokens
lv6-ref-man/lv6-ref-man.tex
+36
-35
36 additions, 35 deletions
lv6-ref-man/lv6-ref-man.tex
test/should_work/enum0.lus
+0
-1
0 additions, 1 deletion
test/should_work/enum0.lus
with
56 additions
and
40 deletions
lv6-ref-man/Makefile
+
16
−
4
View file @
397b7835
...
@@ -31,13 +31,14 @@ FIGS=\
...
@@ -31,13 +31,14 @@ FIGS=\
# targets: lus 2 latex
# targets: lus 2 latex
LUS2TEX
=
\
LUS2TEX
=
\
$(
OBJPDF
)
/is_stable.lus.tex
\
$(
OBJPDF
)
/is_stable.lus.tex
\
$(
OBJPDF
)
/struct.lus.tex
\
$(
OBJPDF
)
/struct
0
.lus.tex
\
$(
OBJPDF
)
/consensus2.lus.tex
\
$(
OBJPDF
)
/consensus2.lus.tex
\
$(
OBJPDF
)
/count.lus.tex
\
$(
OBJPDF
)
/count.lus.tex
\
$(
OBJPDF
)
/EDGE.lus.tex
\
$(
OBJPDF
)
/EDGE.lus.tex
\
$(
OBJPDF
)
/STABLE.lus.tex
\
$(
OBJPDF
)
/STABLE.lus.tex
\
$(
OBJPDF
)
/TIME_STABLE.lus.tex
\
$(
OBJPDF
)
/TIME_STABLE.lus.tex
\
$(
OBJPDF
)
/TIME_STABLE1.lus.tex
\
$(
OBJPDF
)
/TIME_STABLE1.lus.tex
\
$(
OBJPDF
)
/complex.lus.tex
\
$(
OBJPDF
)
/COUNTER.lus.tex
\
$(
OBJPDF
)
/COUNTER.lus.tex
\
$(
OBJPDF
)
/SWITCH.lus.tex
\
$(
OBJPDF
)
/SWITCH.lus.tex
\
$(
OBJPDF
)
/SWITCH1.lus.tex
\
$(
OBJPDF
)
/SWITCH1.lus.tex
\
...
@@ -108,8 +109,19 @@ clean:
...
@@ -108,8 +109,19 @@ clean:
#------------------------------
#------------------------------
# Special : mly 2 latex
# Special : mly 2 latex
#------------------------------
#------------------------------
$(PARSER)
:
../src/lv6parser.mly lustokens
mly2bnf ../src/lv6parser.mly
-t
lustokens |
grep
-v
XXX
>
$@
BIN
=
/usr/local/tools/lustre/misc/bin
./$(OBJPDF)/lv6parser.tex
:
./$(OBJPDF)/rules
cat
$<
|
$(
BIN
)
/rules2tex
-t
lustokens
>
$@
./$(OBJPDF)/rules
:
../src/lv6parser.mly
$(
BIN
)
/yacc2rules ../src/lv6parser.mly
>
$@
./$(OBJPDF)/cleanyacc
:
$(LUTINSRC)/lutParser.mly
cat
$<
|
sed
-e
"s/lus//g"
-e
"s/TK_EOF//"
>
$@
rere
:
rere
:
touch
../src/lv6parser.mly
touch
../src/lv6parser.mly
...
@@ -139,7 +151,7 @@ $(OBJPDF)/%.lus.tex : $(LUSTRE_DIR)/%.lus
...
@@ -139,7 +151,7 @@ $(OBJPDF)/%.lus.tex : $(LUSTRE_DIR)/%.lus
$(OBJPDF)/%-broken.lus.tex
:
$(LUSTRE_DIR)/broken/%.lus
$(OBJPDF)/%-broken.lus.tex
:
$(LUSTRE_DIR)/broken/%.lus
utils/lus2tex
$<
>
$@
utils/lus2tex
$<
>
$@
lus2tex
:
$(
EXEMPLES
)
lus2tex
:
$(
LUS2TEX
)
# obsolete
# obsolete
#lus2tex:
#lus2tex:
...
...
This diff is collapsed.
Click to expand it.
lv6-ref-man/lustokens
+
4
−
0
View file @
397b7835
...
@@ -81,7 +81,11 @@ TK_IF if
...
@@ -81,7 +81,11 @@ TK_IF if
TK_WITH with
TK_WITH with
TK_THEN then
TK_THEN then
TK_ELSE else
TK_ELSE else
TK_MERGE merge
TK_UNSAFE unsafe
TK_SAFE safe
TK_INCLUDE include
TK_INCLUDE include
TK_PROVIDES provides
TK_PROVIDES provides
TK_MODEL model
TK_MODEL model
...
...
This diff is collapsed.
Click to expand it.
lv6-ref-man/lv6-ref-man.tex
+
36
−
35
View file @
397b7835
...
@@ -42,6 +42,7 @@ read directly this chapter.
...
@@ -42,6 +42,7 @@ read directly this chapter.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter
{
An Overview of the Lustre Language
}
\chapter
{
An Overview of the Lustre Language
}
...
@@ -631,6 +632,35 @@ that}.
...
@@ -631,6 +632,35 @@ that}.
%%% Include yacc syntax
%\newcommand{\bnftoken}[1]{{\color{blue2}\bfseries\ttfamily #1}}
%\newcommand{\bnftoken}[1]{{\color{blue2}\bfseries\ttfamily #1}}
%\newcommand{\bnftoken}[1]{{\bfseries\ttfamily #1}}
%\newcommand {\bnftoken}[1]{\mbox{\texttt{\textbf{#1}}}}
%\newcommand{\bnfrightident}[1]{{\color{black}\itshape #1}}
%\newcommand{\bnfrightident}[1]{\mbox{\color{black}\itshape \hyperlink{ebnf#1}{#1}}}
%\newcommand{\bnfleftident}[1]{{\color{black}\itshape #1}}
\newcommand
{
\bnfleftident
}
[1]
{{
\color
{
black
}
\itshape
\hypertarget
{
ebnf#1
}{
#1
}}}
\newcommand
{
\bnfdef
}{
\mbox
{
\color
{
red
}$
::
=
$}}
\renewcommand
{
\bnfor
}{
\mbox
{
\color
{
red3
}$
|
$}}
\newcommand
{
\bnfopt
}
[1]
{
\mbox
{
\color
{
red3
}$
\lbrack
$}
#1
\mbox
{
\color
{
red3
}$
\rbrack
$}}
\newcommand
{
\bnflist
}
[1]
{
\mbox
{
\color
{
red3
}$
\lbrace
$}
#1
\mbox
{
\color
{
red3
}$
\rbrace
$}}
\newcommand
{
\bnfgroup
}
[1]
{
\mbox
{
\color
{
red3
}$
(
$}
#1
\mbox
{
\color
{
red3
}$
)
$}}
%special lexical notations
\newcommand
{
\tkspecial
}
[1]
{
\mbox
{
\color
{
purple
}
\itshape
#1
}}
\newcommand
{
\tkident
}{
\tkspecial
{
ident
}}
\newcommand
{
\tklongident
}{
\tkspecial
{
long
\_
ident
}}
\newcommand
{
\tkreal
}{
\tkspecial
{
floating
}}
\newcommand
{
\tkint
}{
\tkspecial
{
integer
}}
\input
{
lv6parser
}
\begin{itemize}
\begin{itemize}
\item
\item
One-line comments start with
\key
{
--
}
and stop at the the end of the
One-line comments start with
\key
{
--
}
and stop at the the end of the
...
@@ -1142,7 +1172,7 @@ for their declaration and used is provided in Section~\ref{syntax}.
...
@@ -1142,7 +1172,7 @@ for their declaration and used is provided in Section~\ref{syntax}.
\paragraph
{
Enumerations.
}
\paragraph
{
Enumerations.
}
\todo
Enumerations are similar to enumerations in other languages.
\begin{example}
[Enumerations]
\begin{example}
[Enumerations]
...
@@ -1155,7 +1185,7 @@ The declaration of a structured type is (semantically) equivalent to
...
@@ -1155,7 +1185,7 @@ The declaration of a structured type is (semantically) equivalent to
the declaration of an abstract type, a collection of field-access
the declaration of an abstract type, a collection of field-access
functions, and a constructor function.
functions, and a constructor function.
\todo
\begin{example}
[Records]
\begin{example}
[Records]
...
@@ -1173,7 +1203,7 @@ functions, and a constructor function.
...
@@ -1173,7 +1203,7 @@ functions, and a constructor function.
\paragraph
{
Arrays.
}
\paragraph
{
Arrays.
}
\todo
Here are a few examples of array declarations and definitions.
\begin{example}
[Arrays]
\begin{example}
[Arrays]
\begin{alltt}
\begin{alltt}
...
@@ -1973,34 +2003,6 @@ y & 1 & 2 & 1 & 1 & 3 & 2\\
...
@@ -1973,34 +2003,6 @@ y & 1 & 2 & 1 & 1 & 3 & 2\\
\section
{
The syntax rules (automatically generated)
}
\section
{
The syntax rules (automatically generated)
}
%%% Include yacc syntax
%\newcommand{\bnftoken}[1]{{\color{blue2}\bfseries\ttfamily #1}}
%\newcommand{\bnftoken}[1]{{\color{blue2}\bfseries\ttfamily #1}}
%\newcommand{\bnftoken}[1]{{\bfseries\ttfamily #1}}
\newcommand
{
\bnftoken
}
[1]
{
\mbox
{
\texttt
{
\textbf
{
#1
}}}}
%\newcommand{\bnfrightident}[1]{{\color{black}\itshape #1}}
\newcommand
{
\bnfrightident
}
[1]
{
\mbox
{
\color
{
black
}
\itshape
\hyperlink
{
ebnf#1
}{
#1
}}}
%\newcommand{\bnfleftident}[1]{{\color{black}\itshape #1}}
\newcommand
{
\bnfleftident
}
[1]
{{
\color
{
black
}
\itshape
\hypertarget
{
ebnf#1
}{
#1
}}}
\newcommand
{
\bnfdef
}{
\mbox
{
\color
{
red
}$
::
=
$}}
\renewcommand
{
\bnfor
}{
\mbox
{
\color
{
red3
}$
|
$}}
\newcommand
{
\bnfopt
}
[1]
{
\mbox
{
\color
{
red3
}$
\lbrack
$}
#1
\mbox
{
\color
{
red3
}$
\rbrack
$}}
\newcommand
{
\bnflist
}
[1]
{
\mbox
{
\color
{
red3
}$
\lbrace
$}
#1
\mbox
{
\color
{
red3
}$
\rbrace
$}}
\newcommand
{
\bnfgroup
}
[1]
{
\mbox
{
\color
{
red3
}$
(
$}
#1
\mbox
{
\color
{
red3
}$
)
$}}
%special lexical notations
\newcommand
{
\tkspecial
}
[1]
{
\mbox
{
\color
{
purple
}
\itshape
#1
}}
\newcommand
{
\tkident
}{
\tkspecial
{
ident
}}
\newcommand
{
\tklongident
}{
\tkspecial
{
long
\_
ident
}}
\newcommand
{
\tkreal
}{
\tkspecial
{
floating
}}
\newcommand
{
\tkint
}{
\tkspecial
{
integer
}}
\input
{
parser
}
Lexical rules:
Lexical rules:
\begin{itemize}
\begin{itemize}
...
@@ -2024,12 +2026,11 @@ is an two identifiers separated by a double colon (\bnfleftident{Ident}\bnftoken
...
@@ -2024,12 +2026,11 @@ is an two identifiers separated by a double colon (\bnfleftident{Ident}\bnftoken
Lustre V1, v2, v3, ..., v6
Lustre V1, v2, v3, ..., v6
\section
{
The Lustre V4 features not supported in Lustre V6
}
\section
{
Some Lustre V4 features not supported in Lustre V6
}
- recursive arrays slices : use iterators instead
- arrays
- include
- autre ???
\begin{alltt}
\begin{alltt}
[int, real] -> use structures instead
[int, real] -> use structures instead
...
...
This diff is collapsed.
Click to expand it.
test/should_work/enum0.lus
+
0
−
1
View file @
397b7835
type
color1
=
enum
{
blue
,
white
,
black
};
type
color1
=
enum
{
blue
,
white
,
black
};
type
color2
=
enum
{
green
,
orange
,
yellow
};
type
color2
=
enum
{
green
,
orange
,
yellow
};
node
enum0
(
x
:
color1
)
returns
(
y
:
color2
);
node
enum0
(
x
:
color1
)
returns
(
y
:
color2
);
let
let
y
=
if
x
=
blue
then
green
else
if
x
=
white
then
orange
else
yellow
;
y
=
if
x
=
blue
then
green
else
if
x
=
white
then
orange
else
yellow
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment