+/* Copyright (c) 2012-2019. 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. */
+
%option noyywrap
%{
+#include "simgrid/config.h"
+#if !HAVE_UNISTD_H
+#define YY_NO_UNISTD_H /* hello Windows */
+#endif
#include <stdio.h>
#include "parserPromela.tab.hacc"
-
+
extern YYSTYPE yylval;
-
+
%}
blancs [ \t]+
{blancs} { }
-{reel} { sscanf(yytext,"%lf",&yylval.real);
+{reel} { sscanf(yytext,"%lf",&yylval.real);
return (LITT_REEL); }
-{entier} { sscanf(yytext,"%d",&yylval.integer);
+{entier} { sscanf(yytext,"%d",&yylval.integer);
return (LITT_ENT); }
{chaine} { yylval.string=(char *)malloc(strlen(yytext)+1);
- sscanf(yytext,"%s",yylval.string);
+ sscanf(yytext,"%s",yylval.string);
return (LITT_CHAINE); }
[a-zA-Z]{caractere}* { yylval.string=(char *)malloc(strlen(yytext)+1);
sscanf(yytext,"%s",yylval.string);
return (ID); }
-
+
{numl} { }
. { }