I have written a flex program to detect a given word is verb or not. Input will be taken from a text file.I want to improve the code. Is there any way to detect single or multi line strings in the input file( say: "I am a boy" or "I am a boy \ I love football"). In such cases the output will be "single/multi line string is found" that's what i want from my program. How can I do these? please help. This is my sample code:
%%
[\t]+
is |
am |
are |
was |
were {printf("%s: is a verb",yytext);}
[a-zA-Z]+ {printf("%s: is a verb",yytext);}
. |\n
%%
int main(int argc, char *argv[]){
yyin = fopen(argv[1], "r");
yylex();
fclose(yyin);
}