Project

General

Profile

Revision e8f55c25 src/parsers/parser_lustre.mly

View differences:

src/parsers/parser_lustre.mly
54 54
%}
55 55

  
56 56
%token <int> INT
57
%token <Num.num * int * string> REAL
57
%token <Real.t> REAL
58 58

  
59 59
%token <string> STRING
60 60
%token AUTOMATON STATE UNTIL UNLESS RESTART RESUME 
......
470 470
expr:
471 471
/* constants */
472 472
  INT {mkexpr (Expr_const (Const_int $1))}
473
| REAL {let c,e,s = $1 in mkexpr (Expr_const (Const_real (c,e,s)))}
473
| REAL {mkexpr (Expr_const (Const_real $1))}
474 474
| STRING {mkexpr (Expr_const (Const_string $1))}
475 475
| COLCOL IDENT {mkexpr (Expr_const (Const_modeid $2))} 
476 476
    
......
606 606

  
607 607
signed_const:
608 608
  INT {Const_int $1}
609
| REAL {let c,e,s =$1 in Const_real (c,e,s)}
609
| REAL {Const_real $1}
610 610
/* | FLOAT {Const_float $1} */
611 611
| tag_ident {Const_tag $1}
612 612
| MINUS INT {Const_int (-1 * $2)}
613
| MINUS REAL {let c,e,s = $2 in Const_real (Num.minus_num c, e, "-" ^ s)}
613
| MINUS REAL {Const_real (Real.uminus $2)}
614 614
/* | MINUS FLOAT {Const_float (-1. *. $2)} */
615 615
| LCUR signed_const_struct RCUR { Const_struct $2 }
616 616
| LBRACKET signed_const_array RBRACKET { Const_array $2 }

Also available in: Unified diff