Project

General

Profile

Revision 66359a5e src/parser_lustre.mly

View differences:

src/parser_lustre.mly
382 382
/* constants */
383 383
  INT {mkexpr (Expr_const (Const_int $1))}
384 384
| REAL {let c,e,s = $1 in mkexpr (Expr_const (Const_real (c,e,s)))}
385
| STRING {mkexpr (Expr_const (Const_string $1))}
386

  
385 387
/* | FLOAT {mkexpr (Expr_const (Const_float $1))}*/
386 388
/* Idents or type enum tags */
387 389
| IDENT { mkexpr (Expr_ident $1) }
......
579 581

  
580 582
vdecl:
581 583
  ident_list COL typeconst clock 
582
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp $3, $4, false, None) loc) $1 }
584
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp $3, $4, false, None, None) loc) $1 }
583 585
| CONST ident_list /* static parameters don't have clocks */
584
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, true, None) loc) $2 }
586
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, true, None, None) loc) $2 }
585 587
| CONST ident_list COL typeconst /* static parameters don't have clocks */
586
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp $4, mkclock Ckdec_any, true, None) loc) $2 }
588
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp $4, mkclock Ckdec_any, true, None, None) loc) $2 }
587 589

  
588 590
local_vdecl_list:
589 591
  local_vdecl {$1}
......
591 593

  
592 594
local_vdecl:
593 595
/* Useless no ?*/    ident_list
594
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, false, None) loc) $1 }
596
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, false, None, None) loc) $1 }
595 597
| ident_list COL typeconst clock 
596
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp $3, $4, false, None) loc) $1 }
598
    { List.map (fun (id, loc) -> mkvar_decl (id, mktyp $3, $4, false, None, None) loc) $1 }
597 599
| CONST vdecl_ident EQ expr /* static parameters don't have clocks */
598
    { let (id, loc) = $2 in [ mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, true, Some $4) loc] }
600
    { let (id, loc) = $2 in [ mkvar_decl (id, mktyp Tydec_any, mkclock Ckdec_any, true, Some $4, None) loc] }
599 601
| CONST vdecl_ident COL typeconst EQ expr /* static parameters don't have clocks */
600
    { let (id, loc) = $2 in [ mkvar_decl (id, mktyp $4, mkclock Ckdec_any, true, Some $6) loc] }
602
    { let (id, loc) = $2 in [ mkvar_decl (id, mktyp $4, mkclock Ckdec_any, true, Some $6, None) loc] }
601 603

  
602 604
cdecl_list:
603 605
  cdecl SCOL { (fun itf -> [$1 itf]) }

Also available in: Unified diff