Project

General

Profile

Revision 01d48bb0 src/parser_lustre.mly

View differences:

src/parser_lustre.mly
78 78

  
79 79
%nonassoc prec_exists prec_forall
80 80
%nonassoc COMMA
81
%nonassoc EVERY
81 82
%left MERGE IF
82 83
%nonassoc ELSE
83 84
%right ARROW FBY
......
533 534

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

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

  
542 543
vdecl:
543
/* Useless no ?*/    ident_list
544
    { List.map (fun id -> mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, false)) $1 }
544
  ident_list COL typeconst clock 
545
    { List.map (fun id -> mkvar_decl (id, mktyp $3, $4, false, None)) $1 }
546
| CONST ident_list /* static parameters don't have clocks */
547
    { List.map (fun id -> mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, true, None)) $2 }
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, None)) $2 }
550

  
551
local_vdecl_list:
552
  local_vdecl {$1}
553
| local_vdecl_list SCOL local_vdecl {$3 @ $1}
545 554

  
555
local_vdecl:
556
/* Useless no ?*/    ident_list
557
    { List.map (fun id -> mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, false, None)) $1 }
546 558
| 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 }
559
    { List.map (fun id -> mkvar_decl (id, mktyp $3, $4, false, None)) $1 }
560
| CONST vdecl_ident EQ expr /* static parameters don't have clocks */
561
    { [ mkvar_decl ($2, mktyp Tydec_any, mkclock Ckdec_any, true, Some $4) ] }
562
| CONST vdecl_ident COL typeconst EQ expr /* static parameters don't have clocks */
563
    { [ mkvar_decl ($2, mktyp $4, mkclock Ckdec_any, true, Some $6) ] }
550 564

  
551 565
cdecl_list:
552 566
  cdecl SCOL { (fun itf -> [$1 itf]) }

Also available in: Unified diff