X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ced9dcdda93248164607c1c9a5c0d8a93b161c0a..85ba969329ba8ffcdd29e8adbfdb58047bfc80ee:/src/xbt/automaton/parserPromela.yacc diff --git a/src/xbt/automaton/parserPromela.yacc b/src/xbt/automaton/parserPromela.yacc index 6c6ae1f18f..cfbc046103 100644 --- a/src/xbt/automaton/parserPromela.yacc +++ b/src/xbt/automaton/parserPromela.yacc @@ -1,8 +1,17 @@ +/* Copyright (c) 2012-2018. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + %{ +#include "simgrid/config.h" +#if !HAVE_UNISTD_H +#define YY_NO_UNISTD_H /* hello Windows */ +#endif -#include "automaton_parse.yy.c" +#include "automaton_lexer.yy.c" #include -#include void yyerror(const char *s); @@ -12,7 +21,7 @@ void yyerror(const char *s); double real; int integer; char* string; - xbt_exp_label_t label; + xbt_automaton_exp_label_t label; } %token NEVER @@ -45,11 +54,11 @@ void yyerror(const char *s); %% -automaton : NEVER LEFT_BRACE stateseq RIGHT_BRACE +automaton : NEVER LEFT_BRACE stateseq RIGHT_BRACE ; -stateseq : - | ID COLON { new_state($1, 1);} IF option FI SEMI_COLON stateseq +stateseq : + | ID COLON { new_state($1, 1);} IF option FI SEMI_COLON stateseq ; option : @@ -63,7 +72,7 @@ exp : LEFT_PAR exp RIGHT_PAR { $$ = $2; } | CASE_TRUE { $$ = new_label(4); } | ID { $$ = new_label(3, $1); } ; - + %%