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);
25 bcopy(yytext,yytext+2,yyleng-2);
26 yytext += 2; yyleng -= 2;
30 yyleng -= 1; yytext[yyleng] = '\0';
31 printf("string = \"%s\"",yytext); BEGIN(INITIAL);