%{ #include<stdio.h> char st[20]; int i; %} le [a][b][c] %% {le} {printf("ABC");} . {printf("%c",yytext[0]);} %% int yywrap(){} int main() { yylex(); }
abc
Standard output is empty
ERROR: /home/Yg5a9A/prog:2:9: Syntax error: Operator expected ERROR: /home/Yg5a9A/prog:15:0: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit