%{ #include <stdio.h> int wordCount = 0; %} %% [a-zA-Z]+ { wordCount++; } . ; %% int main() { yylex(); return 0; }
hello how are you
Standard output is empty
ERROR: /home/5jURz5/prog:2:1: Syntax error: Operator expected ERROR: /home/5jURz5/prog:18:1: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit