Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / src / xbt / automaton / parserPromela.lex
index 04384ea..2207f74 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014. The SimGrid Team.
+/* Copyright (c) 2012-2022. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -8,19 +8,16 @@
 
 %{
 
-#include "simgrid_config.h"
-#ifndef HAVE_UNISTD_H
+#include "simgrid/config.h"
+#if !HAVE_UNISTD_H
 #define YY_NO_UNISTD_H /* hello Windows */
-static int isatty(int fd) {
-  return 0;
-}
 #endif
 
 #include <stdio.h>
 #include "parserPromela.tab.hacc"
-  
+
   extern YYSTYPE yylval;
+
 %}
 
 blancs       [ \t]+
@@ -63,20 +60,20 @@ commentaire  "/*"([^\*\/]*{nouv_ligne}*[^\*\/]*)*"*/"
 {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}                    { }
 
 .                         { }