#include #include extern char *yytext; extern int yyparse(); extern int yylineno; #include "gram.tab.h" int main() { yyparse(); return EXIT_SUCCESS; } int yywrap( ) { /* utilise par yylex() traitement d'un seul fichier pour plusieurs fichiers, retourner 0 equivalent a %option noyywrap dans le fichier flex */ return 1; } void yyerror(char *s) { /* utilise par yyparse() */ printf("%d <%s>: %s!!", yylineno, yytext, s); }