X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f23b0fb864cb60978c1fcfd48d50f62dd054fe31..26ba5558401021cb3854f2f1a5ffedd7044f6823:/src/xbt/automaton/parserPromela.yacc diff --git a/src/xbt/automaton/parserPromela.yacc b/src/xbt/automaton/parserPromela.yacc index cfbc046103..5186563403 100644 --- a/src/xbt/automaton/parserPromela.yacc +++ b/src/xbt/automaton/parserPromela.yacc @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2018. The SimGrid Team. +/* Copyright (c) 2012-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -15,6 +15,9 @@ void yyerror(const char *s); +static void new_state(const char* id, int src); +static void new_transition(const char* id, xbt_automaton_exp_label_t label); + %} %union{ @@ -66,11 +69,11 @@ option : ; exp : LEFT_PAR exp RIGHT_PAR { $$ = $2; } - | exp OR exp { $$ = new_label(0, $1, $3); } - | exp AND exp { $$ = new_label(1, $1, $3); } - | NOT exp { $$ = new_label(2, $2); } - | CASE_TRUE { $$ = new_label(4); } - | ID { $$ = new_label(3, $1); } + | exp OR exp { $$ = xbt_automaton_exp_label_new_or($1, $3); } + | exp AND exp { $$ = xbt_automaton_exp_label_new_and($1, $3); } + | NOT exp { $$ = xbt_automaton_exp_label_new_not($2); } + | CASE_TRUE { $$ = xbt_automaton_exp_label_new_one(); } + | ID { $$ = xbt_automaton_exp_label_new_predicat($1); } ; %%