Project

General

Profile

Revision b3381ae8

View differences:

src/lexer_lustre.mll
72 72
  "pre", PRE;
73 73
  "div", DIV;
74 74
  "const", CONST;
75
  "open", OPEN;
76 75
  "assert", ASSERT;
77 76
]
78 77

  
......
124 123
| ['0'-'9']+ '.' ['0'-'9']+ ('E'|'e') ('+'|'-') ['0'-'9'] ['0'-'9']* as s {REAL s}
125 124
| "tel." {TEL}
126 125
| "tel;" {TEL}
126
| "#open" { OPEN }
127 127
| ['_' 'a'-'z' 'A'-'Z'] [ '_' 'a'-'z' 'A'-'Z' '0'-'9']*
128 128
    {let s = Lexing.lexeme lexbuf in
129 129
    try
src/typing.ml
185 185
      begin
186 186
	unify t1' t2';
187 187
	Dimension.eval Basic_library.eval_env (fun c -> None) e1;
188
	Dimension.eval Basic_library.eval_env (fun c -> None) e1;
188
	Dimension.eval Basic_library.eval_env (fun c -> None) e2;
189 189
	Dimension.unify e1 e2;
190 190
      end
191 191
    | _,_ -> raise (Unify (t1, t2))
test/src/arrays_arnaud/MatrixAndArrays.lus
1
#open "dummy_lib"
2

  
1 3
const MatrixAndArrays_Constant_Value = [ [ 2.2, 3.3, 4.4, 2.2, 4.4, 3.3 ] ] ;
2 4
const MatrixAndArrays_Gain_Gain = [ [ 2.1, 1.0, 3.0, 4.2 ] ] ;
3 5
const MatrixAndArrays_UnitDelay_InitialValue = [ [ 1.1, 2.2, 1.0, 1.0 ] ] ;
4 6

  
5
function _MatMul_real (
6
	const n, m, p : int ;
7
	in1 : real^n^m ;
8
	in2 : real^m^p)
9
returns (
10
	out : real^n^p) ;
11 7

  
12 8
node MatrixAndArrays (
13 9
	In1_Out1_11 : real^2^3)
test/src/arrays_arnaud/RelOpMatrix.lus
1
#open "dummy_lib"
2

  
1 3
const RelOpMatrix_Constant_Value = 1.1 ;
2 4

  
3
function _Vect_Leqt_real (
4
	const n : int ;
5
	in : real^n ;
6
	in2 : real^n)
7
returns (
8
	out : bool^n) ;
9 5

  
10 6
node RelOpMatrix (
11 7
	In1_Out1_11 : real^2)
test/src/arrays_arnaud/access1.lus
1
imported node test(x:int) returns (t:int^2);
1
#open "dummy_lib"
2 2

  
3 3
node access(tab : int^3^4) returns (o:int)
4 4
var tab2,x;
test/src/arrays_arnaud/generic1.lus
1
#open "dummy_lib"
2

  
1 3
type choice = enum { one, two };
2 4
type entier = int;
3 5

  
......
8 10
const M1 = [ [ 2.1 ], [ 1.0 ], [ 3.0 ], [ 4.2 ] ] ;
9 11
const M2 = [ [ 1.1, 2.2, 1.0, 1.0 ] ] ;
10 12

  
11
function _MatMul_real (
12
	const n, m, p : int ;
13
	in1 : real^n^m ;
14
	in2 : real^m^p)
15
returns (
16
	out : real^n^p) ;
17

  
18
imported node imp1(const m:int; a:int^(PI*m)) returns (c:int^m);
19

  
20
imported node imp2(const n:int; a:int^n) returns (d:int^n);
21 13

  
22 14
node mult(
23 15
     in1 : real^4^1)
test/src/arrays_arnaud/generic2.lus
1
const PI = 3;
1
#open "dummy_lib"
2 2

  
3
imported node imp1(const m:int; a:int^(PI*m)) returns (c:int^m);
3
const PI = 3;
4 4

  
5
imported node imp2(const n:int; a:int^n) returns (d:int^n);
6 5
    
7 6
node base(const p:int; x:int^(PI*p)) returns (y:int^p)
8 7
var z:int^(PI*p)^2;
test/src/arrays_arnaud/generic3.lus
1
const PI = 3;
1
#open "dummy_lib"
2 2

  
3
imported node imp1(const m:int; a:int^(PI*m)) returns (c:int^m);
3
const PI = 3;
4 4

  
5
imported node imp2(const n:int; a:int^n) returns (d:int^n);
6 5
  
7 6
node base(const p:int; x:int^(PI*p)) returns (y:int^p)
8 7
var z:int^(PI*p);

Also available in: Unified diff