%{ #include<stdio.h> %} %% [A-Z] {printf("Uppercase: %s\n", yytext);} [a-z] {printf("Lowercase: %s\n", yytext);} . ; int main(){ printf("Enter string: "); yylex(); return 0; } int yywrap(){ return 1; }
Standard input is empty
Standard output is empty
ERROR: /home/7Az1Zc/prog:2:3: Syntax error: Operator expected ERROR: /home/7Az1Zc/prog:18:0: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit