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
ade66878
Commit
ade66878
authored
16 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
Do not print (in the lic generator) Enum const, that were just artificially defined.
parent
e3cb8fe1
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
src/compiledDataDump.ml
+7
-6
7 additions, 6 deletions
src/compiledDataDump.ml
src/test/should_work/demo/plus.lus
+8
-6
8 additions, 6 deletions
src/test/should_work/demo/plus.lus
src/test/test.res.exp
+0
-22
0 additions, 22 deletions
src/test/test.res.exp
with
16 additions
and
35 deletions
Makefile
+
1
−
1
View file @
ade66878
...
...
@@ -4,7 +4,7 @@
all
:
cd
src
;
make
cd
src
;
make
;
make
test
.PHONY
:
diff test log
...
...
This diff is collapsed.
Click to expand it.
src/compiledDataDump.ml
+
7
−
6
View file @
ade66878
(** Time-stamp: <modified the 08/07/2008 (at 1
5
:3
8
) by Erwan Jahier> *)
(** Time-stamp: <modified the 08/07/2008 (at 1
7
:3
6
) by Erwan Jahier> *)
(* Call it LicDump? *)
...
...
@@ -398,16 +398,17 @@ and (type_decl: Ident.long -> type_eff -> string) =
and
(
const_decl
:
Ident
.
long
->
const_eff
->
string
)
=
fun
tname
ceff
->
"const "
^
(
long
tname
)
^
let
str
=
"const "
^
(
long
tname
)
in
(
match
ceff
with
|
Extern_const_eff
_
->
":"
^
(
string_of_type_eff
(
type_of_const_eff
ceff
))
|
Enum_const_eff
_
->
""
(* enum const are defined as extern const *)
|
Extern_const_eff
_
->
str
^
":"
^
(
string_of_type_eff
(
type_of_const_eff
ceff
))
^
";
\n
"
|
Enum_const_eff
_
->
""
(* do not print those const *)
|
Struct_const_eff
_
->
assert
false
|
Array_const_eff
_
|
Bool_const_eff
_
|
Int_const_eff
_
|
Real_const_eff
_
->
" = "
^
(
string_of_const_eff
ceff
)
)
^
";
\n
"
|
Real_const_eff
_
->
str
^
" = "
^
(
string_of_const_eff
ceff
)
^
";
\n
"
)
and
(
node_of_node_exp_eff
:
node_exp_eff
->
string
)
=
fun
neff
->
...
...
This diff is collapsed.
Click to expand it.
src/test/should_work/demo/plus.lus
+
8
−
6
View file @
ade66878
node
plus
(
a
:
int
;
b
:
int
)
returns
(
c
,
d
,
e
,
f
:
int
);
let
c
=
Lustre
::
iplus
(
a
,
b
);
d
=
a
+
b
;
e
=
if
(
boolred
<<
0
,
1
,
2
>>
(
true
^
2
))
then
a
else
b
;
f
=
if
(
nor
(
c
<
b
,
Lustre
::
lte
(
c
,
b
)))
then
a
else
b
+
if
(
boolred
<<
0
,
0
,
2
>>
([
c
<
b
,
Lustre
::
lte
(
c
,
b
)]))
then
a
else
b
;
tel
let
c
=
Lustre
::
iplus
(
a
,
b
);
d
=
a
+
b
;
e
=
if
(
boolred
<<
0
,
1
,
2
>>
(
true
^
2
))
then
a
else
b
;
f
=
if
(
nor
(
c
<
b
,
Lustre
::
lte
(
c
,
b
)))
then
a
else
b
+
if
(
boolred
<<
0
,
0
,
2
>>
([
c
<
b
,
Lustre
::
lte
(
c
,
b
)]))
then
a
else
b
;
tel
This diff is collapsed.
Click to expand it.
src/test/test.res.exp
+
0
−
22
View file @
ade66878
...
...
@@ -1338,12 +1338,6 @@ tel
Opening file /home/jahier/lus2lic/src/test/should_work/NONREG/enum.lus
type _enum::couleur = enum {enum::bleu, enum::blanc, enum::rouge};
type _enum::color = enum {enum::blue, enum::white, enum::redd};
const enum::bleu;
const enum::blanc;
const enum::redd;
const enum::rouge;
const enum::blue;
const enum::white;
node enum::boo(e:int) returns (c:_enum::couleur; c2:_enum::color);
let
c = ( if (e = 0) then bleu else ( if (e = 1) then blanc else rouge));
...
...
@@ -3656,9 +3650,6 @@ const inter::n = -4;
const mainPack::N = 8;
type _mainPack::T = int^8;
type _mainPack::couleurs = enum {mainPack::bleu, mainPack::rose, mainPack::jaune};
const mainPack::bleu;
const mainPack::jaune;
const mainPack::rose;
const mainPack::X = 8;
type _inter::selType = struct {i : int; b : bool; r : real};
...
...
@@ -3682,8 +3673,6 @@ let
tel
-- end of node mainPack::preced
type _inter::toto = enum {inter::X, inter::Y};
const inter::X;
const inter::Y;
----------------------------------------------------------------------
====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/pfs.lus
...
...
@@ -3980,9 +3969,6 @@ type A_bool_10 = bool^10;
====> ../lus2lic -vl 2 --compile-all-items should_work/clock/when_enum.lus
Opening file /home/jahier/lus2lic/src/test/should_work/clock/when_enum.lus
type _when_enum::t = enum {when_enum::A, when_enum::B, when_enum::C};
const when_enum::A;
const when_enum::B;
const when_enum::C;
*** Error in file "should_work/clock/when_enum.lus", line 9, col 19 to 22, token 'when':
*** syntax error: clock expr expected
...
...
@@ -4548,10 +4534,6 @@ type _decl::coord = struct {x : real; y : real};
type _decl::coord_tab = _decl::coord^1;
type _decl::couleur = enum {decl::bleu, decl::blanc, decl::rouge};
const decl::e = 8.500000;
const decl::blanc;
const decl::f;
const decl::bleu;
const decl::rouge;
const decl::a:int;
const decl::b:int;
const decl::c:int;
...
...
@@ -4596,10 +4578,6 @@ type _declaration::coord = struct {x : real; y : real};
type _declaration::coord_tab = _declaration::coord^1;
type _declaration::couleur = enum {declaration::bleu, declaration::blanc, declaration::rouge};
const declaration::e = 8.500000;
const declaration::blanc;
const declaration::f;
const declaration::bleu;
const declaration::rouge;
const declaration::a:int;
const declaration::b:int;
const declaration::c:int;
...
...
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