7 #include "parserPromela.tab.hacc"
19 reel {entier}("."{entier})
20 caractere [a-zA-Z0-9_]
24 chaine \"({caractere}*|\n|\\|\"|{espace}*)*\"
26 commentaire "/*"([^\*\/]*{nouv_ligne}*[^\*\/]*)*"*/"
30 "never" { printf("%s", yytext); return (NEVER); }
31 "if" { printf("%s", yytext); return (IF); }
32 "fi" { printf("%s", yytext);
34 "->" { printf("%s", yytext); return (IMPLIES); }
35 "goto" { printf("%s", yytext); return (GOTO); }
36 "&&" { printf("%s", yytext); return (AND); }
37 "||" { printf("%s", yytext); return (OR); }
38 "!" { printf("%s", yytext); return (NOT); }
39 "(" { printf("%s", yytext); return (LEFT_PAR); }
40 ")" { printf("%s", yytext); return (RIGHT_PAR); }
41 "::" { printf("%s", yytext); return (CASE); }
42 ":" { printf("%s", yytext); return (COLON); }
43 ";" { printf("%s", yytext); return (SEMI_COLON); }
44 "1" { printf("%s", yytext); return (CASE_TRUE); }
45 "{" { printf("%s", yytext); return (LEFT_BRACE); }
46 "}" { printf("%s", yytext); return (RIGHT_BRACE); }
49 {commentaire} { printf(" ");}
51 {blancs} { printf("%s",yytext); }
54 {reel} { printf("%s",yytext);
55 sscanf(yytext,"%lf",&yylval.real);
58 {entier} { printf("%s",yytext);
59 sscanf(yytext,"%d",&yylval.integer);
62 {chaine} { printf("%s",yytext);
63 yylval.string=(char *)malloc(strlen(yytext)+1);
64 sscanf(yytext,"%s",yylval.string);
65 return (LITT_CHAINE); }
67 [a-zA-Z]{caractere}* { printf("%s",yytext);
68 yylval.string=(char *)malloc(strlen(yytext)+1);
69 sscanf(yytext,"%s",yylval.string);
72 {numl} { printf("\n"); }
74 . { printf("caractère inconnu\n"); }