Project

General

Profile

Revision 1eda3e78 src/parser_lustre.mly

View differences:

src/parser_lustre.mly
188 188

  
189 189
top_decl:
190 190
| CONST cdecl_list { List.rev ($2 false) }
191
| nodespec_list state_annot node_ident LPAR vdecl_list SCOL_opt RPAR RETURNS LPAR vdecl_list SCOL_opt RPAR SCOL_opt locals LET eq_list TEL 
192
    {let eqs, asserts, annots = $16 in
191
| nodespec_list state_annot node_ident LPAR vdecl_list SCOL_opt RPAR RETURNS LPAR vdecl_list SCOL_opt RPAR SCOL_opt locals LET stmt_list TEL 
192
    {let stmts, asserts, annots = $16 in
193 193
     let nd = mktop_decl false (Node
194 194
				  {node_id = $3;
195 195
				   node_type = Types.new_var ();
......
200 200
				   node_gencalls = [];
201 201
				   node_checks = [];
202 202
				   node_asserts = asserts; 
203
				   node_eqs = eqs;
203
				   node_stmts = stmts;
204 204
				   node_dec_stateless = $2;
205 205
				   node_stateless = None;
206 206
				   node_spec = $1;
......
251 251
field_list:                           { [] }
252 252
| field_list IDENT COL typeconst SCOL { ($2, $4) :: $1 }
253 253
      
254
eq_list:
254
stmt_list:
255 255
  { [], [], [] }
256
| eq eq_list {let eql, assertl, annotl = $2 in ($1::eql), assertl, annotl}
257
| assert_ eq_list {let eql, assertl, annotl = $2 in eql, ($1::assertl), annotl}
258
| ANNOT eq_list {let eql, assertl, annotl = $2 in eql, assertl, $1::annotl}
259
| automaton eq_list {let eql, assertl, annotl = $2 in ($1::eql), assertl, annotl}
256
| eq stmt_list {let eql, assertl, annotl = $2 in ((Eq $1)::eql), assertl, annotl}
257
| assert_ stmt_list {let eql, assertl, annotl = $2 in eql, ($1::assertl), annotl}
258
| ANNOT stmt_list {let eql, assertl, annotl = $2 in eql, assertl, $1::annotl}
259
| automaton stmt_list {let eql, assertl, annotl = $2 in ((Aut $1)::eql), assertl, annotl}
260 260

  
261 261
automaton:
262 262
 AUTOMATON type_ident handler_list { (Automata.mkautomata (get_loc ()) $2 $3); failwith "not implemented" }
......
266 266
| handler handler_list { $1::$2 }
267 267

  
268 268
handler:
269
 STATE UIDENT ARROW unless_list locals LET eq_list TEL until_list { Automata.mkhandler (get_loc ()) $2 $4 $9 $5 $7 }
269
 STATE UIDENT ARROW unless_list locals LET stmt_list TEL until_list { Automata.mkhandler (get_loc ()) $2 $4 $9 $5 $7 }
270 270

  
271 271
unless_list:
272 272
    { [] }

Also available in: Unified diff