%{ #include<stdio.h> int lc = 0 , sc = 0 , tc= 0 , oc = 0; %} %% \n {lc++;} %% int main(){ printf("enter input:\n"); yylex(); printf("lines : %d",lc); return 0; }
Standard input is empty
Standard output is empty
ERROR: /home/5DYxGq/prog:15:0: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit