%{ #include<stdio.h> int fact = 1,num; %} %% [0-9]+ { num = atoi(yytext); while (num > 1) fact *= num--; return(0); } %% main() { yylex(); }
Standard input is empty
Standard output is empty
ERROR: /home/WL1zmR/prog:19:0: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit