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. */
11 #include "simgrid_config.h"
13 #define YY_NO_UNISTD_H /* hello Windows */
14 static int isatty(int fd) {
20 #include "parserPromela.tab.hacc"
22 extern YYSTYPE yylval;
32 reel {entier}("."{entier})
33 caractere [a-zA-Z0-9_]
37 chaine \"({caractere}*|\n|\\|\"|{espace}*)*\"
39 commentaire "/*"([^\*\/]*{nouv_ligne}*[^\*\/]*)*"*/"
43 "never" { return (NEVER); }
46 "->" { return (IMPLIES); }
47 "goto" { return (GOTO); }
48 "&&" { return (AND); }
51 "(" { return (LEFT_PAR); }
52 ")" { return (RIGHT_PAR); }
53 "::" { return (CASE); }
54 ":" { return (COLON); }
55 ";" { return (SEMI_COLON); }
56 "1" { return (CASE_TRUE); }
57 "{" { return (LEFT_BRACE); }
58 "}" { return (RIGHT_BRACE); }
66 {reel} { sscanf(yytext,"%lf",&yylval.real);
69 {entier} { sscanf(yytext,"%d",&yylval.integer);
72 {chaine} { yylval.string=(char *)malloc(strlen(yytext)+1);
73 sscanf(yytext,"%s",yylval.string);
74 return (LITT_CHAINE); }
76 [a-zA-Z]{caractere}* { yylval.string=(char *)malloc(strlen(yytext)+1);
77 sscanf(yytext,"%s",yylval.string);