1
Because my flex/lex recognizer displayed a syntax error when trying to recognize the text WRITE 1;
%{
#include "gram.h"
int yyerror(const char *s);
%}
/* letras [A-Za-z]+ */
/* id     ({letras})({letras}|{digito})* */
%%
"ESCREVER" {return   ESCREVER; }                                
"TERMINAR" {return TERMINAR; }
[0-9]+     { yylval.num =atoi(yytext);
             return NUM; }
[A-Za-z0-9]* { yylval.str=strdup(yytext);
                return TEXTO;}
"/" | 
"-" |
"+" |
"*" |
"=" |
.          {return yytext[0];}
[ \n\t]    {  }
%%
int yywrap(){ return 1; }
Which error will return ?
– Diego Souza
Syntax Error , I already changed the grammar , but still the error persists
– Dubosky dumont
just viewing the grammar: the error message "syntax error ..." is probably issued by the parser (Yacc/Bison) that is calling this lexical parser. Guess: symbol
';'in the grammar of Yacc...– JJoao