%{ #include <stdio.h> int v=0, c=0; %} %% [aeiouAEIOU] v++; [a-zA-Z] c++; . ; %% int yywrap() { return 1; } int main() { yylex(); printf("V=%d C=%d\n", v, c); }
Hello world
Standard output is empty
ERROR: /home/I7SGEv/prog:2:1: Syntax error: Operator expected ERROR: /home/I7SGEv/prog:14:0: Syntax error: Unexpected end of file ERROR: '$runtoplevel'/0: Undefined procedure: program/0 Exception: (3) program ? EOF: exit