%{ #include<stdio.h> #include<string.h> %} %% \+91-[1-9][0-9]{9} {printf("%s is a valid phone number",yytext);} %% int main(){ yylex(); return 0; } int yywrap(){ return 1; }
+91-9567547656
Standard output is empty
ERROR: /home/2K5R52/prog:14:0: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit