Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / parser_lustre.mly @ 566dbf49

History | View | Annotate | Download (16.3 KB)

1
/********************************************************************/
2
/*                                                                  */
3
/*  The LustreC compiler toolset   /  The LustreC Development Team  */
4
/*  Copyright 2012 -    --   ONERA - CNRS - INPT                    */
5
/*                                                                  */
6
/*  LustreC is free software, distributed WITHOUT ANY WARRANTY      */
7
/*  under the terms of the GNU Lesser General Public License        */
8
/*  version 2.1.                                                    */
9
/*                                                                  */
10
/********************************************************************/
11

    
12
%{
13
open Utils
14
open LustreSpec
15
open Corelang
16
open Dimension
17
open Parse
18

    
19
let get_loc () = Location.symbol_rloc ()
20

    
21
let mktyp x = mktyp (get_loc ()) x
22
let mkclock x = mkclock (get_loc ()) x
23
let mkvar_decl x = mkvar_decl (get_loc ()) ~orig:true x
24
let mkexpr x = mkexpr (get_loc ()) x
25
let mkeexpr x = mkeexpr (get_loc ()) x 
26
let mkeq x = mkeq (get_loc ()) x
27
let mkassert x = mkassert (get_loc ()) x
28
let mktop_decl itf x = mktop_decl (get_loc ()) (Location.get_module ()) itf x
29
let mkpredef_call x = mkpredef_call (get_loc ()) x
30
(*let mkpredef_unary_call x = mkpredef_unary_call (get_loc ()) x*)
31

    
32
let mkdim_int i = mkdim_int (get_loc ()) i
33
let mkdim_bool b = mkdim_bool (get_loc ()) b
34
let mkdim_ident id = mkdim_ident (get_loc ()) id
35
let mkdim_appl f args = mkdim_appl (get_loc ()) f args
36
let mkdim_ite i t e = mkdim_ite (get_loc ()) i t e
37

    
38
let mkannots annots = { annots = annots; annot_loc = get_loc () }
39

    
40
let node_stack : ident list ref = ref []
41
let debug_calls () = Format.eprintf "call stack: %a@.@?" (Utils.fprintf_list ~sep:", " Format.pp_print_string) !node_stack
42
let push_node nd =  node_stack:= nd :: !node_stack
43
let pop_node () = try node_stack := List.tl !node_stack with _ -> assert false
44
let get_current_node () = try List.hd !node_stack with _ -> assert false
45

    
46
%}
47

    
48
%token <int> INT
49
%token <string> REAL
50
%token <float> FLOAT
51
%token <string> STRING
52
%token AUTOMATON STATE UNTIL UNLESS RESTART RESUME LAST
53
%token STATELESS ASSERT OPEN QUOTE FUNCTION
54
%token <string> IDENT
55
%token <string> UIDENT
56
%token TRUE FALSE
57
%token <LustreSpec.expr_annot> ANNOT
58
%token <LustreSpec.node_annot> NODESPEC
59
%token LBRACKET RBRACKET LCUR RCUR LPAR RPAR SCOL COL COMMA COLCOL 
60
%token AMPERAMPER BARBAR NOT POWER
61
%token IF THEN ELSE
62
%token UCLOCK DCLOCK PHCLOCK TAIL
63
%token MERGE FBY WHEN WHENNOT EVERY
64
%token NODE LET TEL RETURNS VAR IMPORTED SENSOR ACTUATOR WCET TYPE CONST
65
%token STRUCT ENUM
66
%token TINT TFLOAT TREAL TBOOL TCLOCK
67
%token RATE DUE
68
%token EQ LT GT LTE GTE NEQ
69
%token AND OR XOR IMPL
70
%token MULT DIV MOD
71
%token MINUS PLUS UMINUS
72
%token PRE ARROW
73
%token REQUIRES ENSURES OBSERVER
74
%token INVARIANT BEHAVIOR ASSUMES
75
%token EXISTS FORALL
76
%token PROTOTYPE LIB
77
%token EOF
78

    
79
%nonassoc prec_exists prec_forall
80
%nonassoc COMMA
81
%left MERGE IF
82
%nonassoc ELSE
83
%right ARROW FBY
84
%left WHEN WHENNOT UCLOCK DCLOCK PHCLOCK
85
%right COLCOL
86
%right IMPL
87
%left OR XOR BARBAR
88
%left AND AMPERAMPER
89
%left NOT
90
%nonassoc INT
91
%nonassoc EQ LT GT LTE GTE NEQ
92
%left MINUS PLUS
93
%left MULT DIV MOD
94
%left UMINUS
95
%left POWER
96
%left PRE LAST
97
%nonassoc RBRACKET
98
%nonassoc LBRACKET
99

    
100
%start prog
101
%type <LustreSpec.top_decl list> prog
102

    
103
%start header
104
%type <LustreSpec.top_decl list> header
105

    
106
%start lustre_annot
107
%type <LustreSpec.expr_annot> lustre_annot
108

    
109
%start lustre_spec
110
%type <LustreSpec.node_annot> lustre_spec
111

    
112
%%
113

    
114
module_ident:
115
  UIDENT { $1 }
116
| IDENT  { $1 }
117

    
118
tag_ident:
119
  UIDENT  { $1 }
120
| TRUE    { tag_true }
121
| FALSE   { tag_false }
122

    
123
node_ident:
124
  UIDENT { $1 }
125
| IDENT  { $1 }
126

    
127
node_ident_decl:
128
 node_ident { push_node $1; $1 }
129

    
130
vdecl_ident:
131
  UIDENT { $1 }
132
| IDENT  { $1 }
133

    
134
const_ident:
135
  UIDENT { $1 }
136
| IDENT  { $1 }
137

    
138
type_ident:
139
  IDENT { $1 }
140

    
141
prog:
142
 open_list typ_def_prog top_decl_list EOF { $1 @ $2 @ (List.rev $3) }
143

    
144
typ_def_prog:
145
 typ_def_list { $1 false }
146

    
147
header:
148
 open_list typ_def_header top_decl_header_list EOF { $1 @ $2 @ (List.rev $3) }
149

    
150
typ_def_header:
151
 typ_def_list { $1 true }
152

    
153
open_list:
154
  { [] }
155
| open_lusi open_list { $1 :: $2 }
156

    
157
open_lusi:
158
| OPEN QUOTE module_ident QUOTE { mktop_decl false (Open (true, $3))}
159
| OPEN LT module_ident GT { mktop_decl false (Open (false, $3)) }
160

    
161
top_decl_list:
162
   {[]}
163
| top_decl_list top_decl {$2@$1}
164

    
165

    
166
top_decl_header_list:
167
   { [] }
168
| top_decl_header_list top_decl_header { $2@$1 }
169

    
170
state_annot:
171
  FUNCTION { true }
172
| NODE { false }
173

    
174
top_decl_header:
175
| CONST cdecl_list { List.rev ($2 true) }
176
| nodespec_list state_annot node_ident LPAR vdecl_list SCOL_opt RPAR RETURNS LPAR vdecl_list SCOL_opt RPAR  prototype_opt in_lib_opt SCOL
177
    {let nd = mktop_decl true (ImportedNode
178
				 {nodei_id = $3;
179
				  nodei_type = Types.new_var ();
180
				  nodei_clock = Clocks.new_var true;
181
				  nodei_inputs = List.rev $5;
182
				  nodei_outputs = List.rev $10;
183
				  nodei_stateless = $2;
184
				  nodei_spec = $1;
185
				  nodei_prototype = $13;
186
				  nodei_in_lib = $14;})
187
     in
188
     pop_node ();
189
     (*add_imported_node $3 nd;*) [nd] }
190

    
191
prototype_opt:
192
 { None }
193
| PROTOTYPE node_ident { Some $2}
194

    
195
in_lib_opt:
196
{ None }
197
| LIB module_ident {Some $2} 
198

    
199
top_decl:
200
| CONST cdecl_list { List.rev ($2 false) }
201
| nodespec_list state_annot node_ident_decl LPAR vdecl_list SCOL_opt RPAR RETURNS LPAR vdecl_list SCOL_opt RPAR SCOL_opt locals LET stmt_list TEL 
202
    {
203
      let stmts, asserts, annots = $16 in
204
      (* Declaring eqs annots *)
205
      List.iter (fun ann -> 
206
	List.iter (fun (key, _) -> 
207
	  Annotations.add_node_ann $3 key
208
	) ann.annots
209
      ) annots;
210
     (* Building the node *)
211
      let nd = mktop_decl false (Node
212
				   {node_id = $3;
213
				    node_type = Types.new_var ();
214
				    node_clock = Clocks.new_var true;
215
				    node_inputs = List.rev $5;
216
				    node_outputs = List.rev $10;
217
				    node_locals = List.rev $14;
218
				    node_gencalls = [];
219
				    node_checks = [];
220
				    node_asserts = asserts; 
221
				    node_stmts = stmts;
222
				    node_dec_stateless = $2;
223
				    node_stateless = None;
224
				    node_spec = $1;
225
				    node_annot = annots})
226
      in
227
     (*add_node $3 nd;*) [nd] }
228
    
229
 nodespec_list:
230
 { None }
231
| NODESPEC nodespec_list { 
232
  (function 
233
  | None    -> (fun s1 -> Some s1) 
234
  | Some s2 -> (fun s1 -> Some (merge_node_annot s1 s2))) $2 $1 }
235

    
236
typ_def_list:
237
    /* empty */             { (fun itf -> []) }
238
| typ_def SCOL typ_def_list { (fun itf -> let ty1 = ($1 itf) in ty1 :: ($3 itf)) }
239

    
240
typ_def:
241
  TYPE type_ident EQ typ_def_rhs { (fun itf ->
242
			       let typ = mktop_decl itf (TypeDef { tydef_id = $2;
243
								   tydef_desc = $4
244
							})
245
			       in (*add_type itf $2 typ;*) typ) }
246

    
247
typ_def_rhs:
248
  typeconst                   { $1 }
249
| ENUM LCUR tag_list RCUR     { Tydec_enum (List.rev $3) }
250
| STRUCT LCUR field_list RCUR { Tydec_struct (List.rev $3) }
251

    
252
array_typ_decl:
253
                            { fun typ -> typ }
254
 | POWER dim array_typ_decl { fun typ -> $3 (Tydec_array ($2, typ)) }
255

    
256
typeconst:
257
  TINT array_typ_decl   { $2 Tydec_int }
258
| TBOOL array_typ_decl  { $2 Tydec_bool  }
259
| TREAL array_typ_decl  { $2 Tydec_real  }
260
| TFLOAT array_typ_decl { $2 Tydec_float }
261
| type_ident array_typ_decl  { $2 (Tydec_const $1) }
262
| TBOOL TCLOCK          { Tydec_clock Tydec_bool }
263
| IDENT TCLOCK          { Tydec_clock (Tydec_const $1) }
264

    
265
tag_list:
266
  UIDENT                { $1 :: [] }
267
| tag_list COMMA UIDENT { $3 :: $1 }
268
      
269
field_list:                           { [] }
270
| field_list IDENT COL typeconst SCOL { ($2, $4) :: $1 }
271
      
272
stmt_list:
273
  { [], [], [] }
274
| eq stmt_list {let eql, assertl, annotl = $2 in ((Eq $1)::eql), assertl, annotl}
275
| assert_ stmt_list {let eql, assertl, annotl = $2 in eql, ($1::assertl), annotl}
276
| ANNOT stmt_list {let eql, assertl, annotl = $2 in eql, assertl, $1::annotl}
277
| automaton stmt_list {let eql, assertl, annotl = $2 in ((Aut $1)::eql), assertl, annotl}
278

    
279
automaton:
280
 AUTOMATON type_ident handler_list { Automata.mkautomata (get_loc ()) $2 $3 }
281

    
282
handler_list:
283
     { [] }
284
| handler handler_list { $1::$2 }
285

    
286
handler:
287
 STATE UIDENT COL unless_list locals LET stmt_list TEL until_list { Automata.mkhandler (get_loc ()) $2 $4 $9 $5 $7 }
288

    
289
unless_list:
290
    { [] }
291
| unless unless_list { $1::$2 }
292

    
293
until_list:
294
    { [] }
295
| until until_list { $1::$2 }
296

    
297
unless:
298
  UNLESS expr RESTART UIDENT { (get_loc (), $2, true, $4)  }
299
| UNLESS expr RESUME UIDENT  { (get_loc (), $2, false, $4) }
300

    
301
until:
302
  UNTIL expr RESTART UIDENT { (get_loc (), $2, true, $4)  }
303
| UNTIL expr RESUME UIDENT  { (get_loc (), $2, false, $4) }
304

    
305
assert_:
306
| ASSERT expr SCOL {mkassert ($2)}
307

    
308
eq:
309
       ident_list      EQ expr SCOL {mkeq (List.rev $1,$3)}
310
| LPAR ident_list RPAR EQ expr SCOL {mkeq (List.rev $2,$5)}
311

    
312
lustre_spec:
313
| contract EOF { $1 }
314

    
315
contract:
316
requires ensures behaviors { { requires = $1; ensures = $2; behaviors = $3; spec_loc = get_loc () } }
317
 
318
requires:
319
{ [] }
320
| REQUIRES qexpr SCOL requires { $2::$4 }
321

    
322
ensures:
323
{ [] }
324
| ENSURES qexpr SCOL ensures { $2 :: $4 }
325
| OBSERVER node_ident LPAR tuple_expr RPAR SCOL ensures { 
326
  mkeexpr (mkexpr ((Expr_appl ($2, mkexpr (Expr_tuple $4), None)))) :: $7
327
}
328

    
329
behaviors:
330
{ [] }
331
| BEHAVIOR IDENT COL assumes ensures behaviors { ($2,$4,$5,get_loc ())::$6 }
332

    
333
assumes:
334
{ [] }
335
| ASSUMES qexpr SCOL assumes { $2::$4 } 
336

    
337
/* WARNING: UNUSED RULES */
338
tuple_qexpr:
339
| qexpr COMMA qexpr {[$3;$1]}
340
| tuple_qexpr COMMA qexpr {$3::$1}
341

    
342
qexpr:
343
| expr { mkeexpr $1 }
344
  /* Quantifiers */
345
| EXISTS vdecl SCOL qexpr %prec prec_exists { extend_eexpr [Exists, $2] $4 } 
346
| FORALL vdecl SCOL qexpr %prec prec_forall { extend_eexpr [Forall, $2] $4 }
347

    
348

    
349
tuple_expr:
350
    expr COMMA expr {[$3;$1]}
351
| tuple_expr COMMA expr {$3::$1}
352

    
353
// Same as tuple expr but accepting lists with single element
354
array_expr:
355
  expr {[$1]}
356
| expr COMMA array_expr {$1::$3}
357

    
358
dim_list:
359
  dim RBRACKET { fun base -> mkexpr (Expr_access (base, $1)) }
360
| dim RBRACKET LBRACKET dim_list { fun base -> $4 (mkexpr (Expr_access (base, $1))) }
361

    
362
expr:
363
/* constants */
364
  INT {mkexpr (Expr_const (Const_int $1))}
365
| REAL {mkexpr (Expr_const (Const_real $1))}
366
| FLOAT {mkexpr (Expr_const (Const_float $1))}
367
/* Idents or type enum tags */
368
| IDENT { mkexpr (Expr_ident $1) }
369
| tag_ident { mkexpr (Expr_ident $1) (*(Expr_const (Const_tag $1))*) }
370
| LPAR ANNOT expr RPAR
371
    {update_expr_annot (get_current_node ()) $3 $2}
372
| LPAR expr RPAR
373
    {$2}
374
| LPAR tuple_expr RPAR
375
    {mkexpr (Expr_tuple (List.rev $2))}
376

    
377
/* Array expressions */
378
| LBRACKET array_expr RBRACKET { mkexpr (Expr_array $2) }
379
| expr POWER dim { mkexpr (Expr_power ($1, $3)) }
380
| expr LBRACKET dim_list { $3 $1 }
381

    
382
/* Temporal operators */
383
| PRE expr 
384
    {mkexpr (Expr_pre $2)}
385
| expr ARROW expr 
386
    {mkexpr (Expr_arrow ($1,$3))}
387
| expr FBY expr 
388
    {(*mkexpr (Expr_fby ($1,$3))*)
389
      mkexpr (Expr_arrow ($1, mkexpr (Expr_pre $3)))}
390
| expr WHEN vdecl_ident
391
    {mkexpr (Expr_when ($1,$3,tag_true))}
392
| expr WHENNOT vdecl_ident
393
    {mkexpr (Expr_when ($1,$3,tag_false))}
394
| expr WHEN tag_ident LPAR vdecl_ident RPAR
395
    {mkexpr (Expr_when ($1, $5, $3))}
396
| MERGE vdecl_ident handler_expr_list
397
    {mkexpr (Expr_merge ($2,$3))}
398

    
399
/* Applications */
400
| node_ident LPAR expr RPAR
401
    {mkexpr (Expr_appl ($1, $3, None))}
402
| node_ident LPAR expr RPAR EVERY expr
403
    {mkexpr (Expr_appl ($1, $3, Some $6))}
404
| node_ident LPAR tuple_expr RPAR
405
    {mkexpr (Expr_appl ($1, mkexpr (Expr_tuple (List.rev $3)), None))}
406
| node_ident LPAR tuple_expr RPAR EVERY expr
407
    {mkexpr (Expr_appl ($1, mkexpr (Expr_tuple (List.rev $3)), Some $6)) }
408

    
409
/* Boolean expr */
410
| expr AND expr 
411
    {mkpredef_call "&&" [$1;$3]}
412
| expr AMPERAMPER expr 
413
    {mkpredef_call "&&" [$1;$3]}
414
| expr OR expr 
415
    {mkpredef_call "||" [$1;$3]}
416
| expr BARBAR expr 
417
    {mkpredef_call "||" [$1;$3]}
418
| expr XOR expr 
419
    {mkpredef_call "xor" [$1;$3]}
420
| NOT expr 
421
    {mkpredef_call "not" [$2]}
422
| expr IMPL expr 
423
    {mkpredef_call "impl" [$1;$3]}
424

    
425
/* Comparison expr */
426
| expr EQ expr 
427
    {mkpredef_call "=" [$1;$3]}
428
| expr LT expr 
429
    {mkpredef_call "<" [$1;$3]}
430
| expr LTE expr 
431
    {mkpredef_call "<=" [$1;$3]}
432
| expr GT expr 
433
    {mkpredef_call ">" [$1;$3]}
434
| expr GTE  expr 
435
    {mkpredef_call ">=" [$1;$3]}
436
| expr NEQ expr 
437
    {mkpredef_call "!=" [$1;$3]}
438

    
439
/* Arithmetic expr */
440
| expr PLUS expr 
441
    {mkpredef_call "+" [$1;$3]}
442
| expr MINUS expr 
443
    {mkpredef_call "-" [$1;$3]}
444
| expr MULT expr 
445
    {mkpredef_call "*" [$1;$3]}
446
| expr DIV expr 
447
    {mkpredef_call "/" [$1;$3]}
448
| MINUS expr %prec UMINUS
449
  {mkpredef_call "uminus" [$2]}
450
| expr MOD expr 
451
    {mkpredef_call "mod" [$1;$3]}
452

    
453
/* If */
454
| IF expr THEN expr ELSE expr
455
    {mkexpr (Expr_ite ($2, $4, $6))}
456

    
457
handler_expr_list:
458
   { [] }
459
| handler_expr handler_expr_list { $1 :: $2 }
460

    
461
handler_expr:
462
 LPAR tag_ident ARROW expr RPAR { ($2, $4) }
463

    
464
signed_const_array:
465
| signed_const { [$1] }
466
| signed_const COMMA signed_const_array { $1 :: $3 }
467

    
468
signed_const_struct:
469
| IDENT EQ signed_const { [ ($1, $3) ] }
470
| IDENT EQ signed_const COMMA signed_const_struct { ($1, $3) :: $5 }
471

    
472
signed_const:
473
  INT {Const_int $1}
474
| REAL {Const_real $1}
475
| FLOAT {Const_float $1}
476
| tag_ident {Const_tag $1}
477
| MINUS INT {Const_int (-1 * $2)}
478
| MINUS REAL {Const_real ("-" ^ $2)}
479
| MINUS FLOAT {Const_float (-1. *. $2)}
480
| LCUR signed_const_struct RCUR { Const_struct $2 }
481
| LBRACKET signed_const_array RBRACKET { Const_array $2 }
482

    
483
dim:
484
   INT { mkdim_int $1 }
485
| LPAR dim RPAR { $2 }
486
| UIDENT { mkdim_ident $1 }
487
| IDENT { mkdim_ident $1 }
488
| dim AND dim 
489
    {mkdim_appl "&&" [$1;$3]}
490
| dim AMPERAMPER dim 
491
    {mkdim_appl "&&" [$1;$3]}
492
| dim OR dim 
493
    {mkdim_appl "||" [$1;$3]}
494
| dim BARBAR dim 
495
    {mkdim_appl "||" [$1;$3]}
496
| dim XOR dim 
497
    {mkdim_appl "xor" [$1;$3]}
498
| NOT dim 
499
    {mkdim_appl "not" [$2]}
500
| dim IMPL dim 
501
    {mkdim_appl "impl" [$1;$3]}
502

    
503
/* Comparison dim */
504
| dim EQ dim 
505
    {mkdim_appl "=" [$1;$3]}
506
| dim LT dim 
507
    {mkdim_appl "<" [$1;$3]}
508
| dim LTE dim 
509
    {mkdim_appl "<=" [$1;$3]}
510
| dim GT dim 
511
    {mkdim_appl ">" [$1;$3]}
512
| dim GTE  dim 
513
    {mkdim_appl ">=" [$1;$3]}
514
| dim NEQ dim 
515
    {mkdim_appl "!=" [$1;$3]}
516

    
517
/* Arithmetic dim */
518
| dim PLUS dim 
519
    {mkdim_appl "+" [$1;$3]}
520
| dim MINUS dim 
521
    {mkdim_appl "-" [$1;$3]}
522
| dim MULT dim 
523
    {mkdim_appl "*" [$1;$3]}
524
| dim DIV dim 
525
    {mkdim_appl "/" [$1;$3]}
526
| MINUS dim %prec UMINUS
527
  {mkdim_appl "uminus" [$2]}
528
| dim MOD dim 
529
    {mkdim_appl "mod" [$1;$3]}
530
/* If */
531
| IF dim THEN dim ELSE dim
532
    {mkdim_ite $2 $4 $6}
533

    
534
locals:
535
  {[]}
536
| VAR vdecl_list SCOL {$2}
537

    
538
vdecl_list:
539
    vdecl {$1}
540
| vdecl_list SCOL vdecl {$3 @ $1}
541

    
542
vdecl:
543
/* Useless no ?*/    ident_list
544
    { List.map (fun id -> mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, false)) $1 }
545

    
546
| ident_list COL typeconst clock 
547
    { List.map (fun id -> mkvar_decl (id, mktyp $3, $4, false)) $1 }
548
| CONST ident_list COL typeconst /* static parameters don't have clocks */
549
    { List.map (fun id -> mkvar_decl (id, mktyp $4, mkclock Ckdec_any, true)) $2 }
550

    
551
cdecl_list:
552
  cdecl SCOL { (fun itf -> [$1 itf]) }
553
| cdecl cdecl_list SCOL { (fun itf -> let c1 = ($1 itf) in c1::($2 itf)) }
554

    
555
cdecl:
556
    const_ident EQ signed_const {
557
      (fun itf -> 
558
       let c = mktop_decl itf (Const {
559
				   const_id = $1;
560
				   const_loc = Location.symbol_rloc ();
561
				   const_type = Types.new_var ();
562
				   const_value = $3})
563
       in
564
       (*add_const itf $1 c;*) c)
565
    }
566

    
567
clock:
568
    {mkclock Ckdec_any}
569
| when_list
570
    {mkclock (Ckdec_bool (List.rev $1))}
571

    
572
when_cond:
573
  WHEN IDENT {($2, tag_true)}
574
| WHENNOT IDENT {($2, tag_false)}
575
| WHEN tag_ident LPAR IDENT RPAR {($4, $2)}
576

    
577
when_list:
578
    when_cond {[$1]}
579
| when_list when_cond {$2::$1}
580

    
581
ident_list:
582
  vdecl_ident {[$1]}
583
| ident_list COMMA vdecl_ident {$3::$1}
584

    
585
SCOL_opt:
586
    SCOL {} | {}
587

    
588

    
589
lustre_annot:
590
lustre_annot_list EOF { { annots = $1; annot_loc = get_loc () } }
591

    
592
lustre_annot_list:
593
  { [] } 
594
| kwd COL qexpr SCOL lustre_annot_list { ($1,$3)::$5 }
595
| IDENT COL qexpr SCOL lustre_annot_list { ([$1],$3)::$5 }
596
| INVARIANT COL qexpr SCOL lustre_annot_list{ (["invariant"],$3)::$5 }
597
| OBSERVER COL qexpr SCOL lustre_annot_list { (["observer"],$3)::$5 }
598

    
599
kwd:
600
DIV { [] }
601
| DIV IDENT kwd { $2::$3}
602

    
603
%%
604
(* Local Variables: *)
605
(* compile-command:"make -C .." *)
606
(* End: *)
607

    
608