2 * yymore.lex: An example of using yymore()
9 void yyerror(char *message)
11 printf("Error: %s\n",message);
21 <STRING>[^\\\n"]* yymore();
22 <STRING><<EOF>> yyerror("EOF in string."); BEGIN(INITIAL);
23 <STRING>\n yyerror("Unterminated string."); BEGIN(INITIAL);
24 <STRING>\\\n yymore();
26 yytext[yyleng-1] = '\0';
27 printf("string = \"%s\"",yytext); BEGIN(INITIAL);