1 /* Copyright (c) 2012-2014. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #include "simgrid_config.h"
10 #define YY_NO_UNISTD_H /* hello Windows */
13 #include "automaton_lexer.yy.c"
14 #include <xbt/automaton.h>
16 void yyerror(const char *s);
24 xbt_automaton_exp_label_t label;
43 %token <integer> LITT_ENT
44 %token <string> LITT_CHAINE
45 %token <real> LITT_REEL
57 automaton : NEVER LEFT_BRACE stateseq RIGHT_BRACE
61 | ID COLON { new_state($1, 1);} IF option FI SEMI_COLON stateseq
65 | CASE exp IMPLIES GOTO ID option { new_transition($5, $2);}
68 exp : LEFT_PAR exp RIGHT_PAR { $$ = $2; }
69 | exp OR exp { $$ = new_label(0, $1, $3); }
70 | exp AND exp { $$ = new_label(1, $1, $3); }
71 | NOT exp { $$ = new_label(2, $2); }
72 | CASE_TRUE { $$ = new_label(4); }
73 | ID { $$ = new_label(3, $1); }
80 void yyerror(const char *s){
81 fprintf (stderr, "%s\n", s);