%{ #include<stdio.h> %} %% a(a|b)*b {printf("valid");} .* {printf("Reject");} %% int main(){ printf("enter:"); yylex(); } int yywrap(){ return 1; }
ab
Standard output is empty
ERROR: /home/DmnHv8/prog:16:0: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit