From: <Wor...@gm...> - 2019-02-27 13:13:15
|
Hi everyone, i've got me the book flex&bison and have troubles with one of the first examples: %{ #include <stdio.h> %} %% [_a-zA-Z0-9]+\( { printf("This is a function name %s (steps=%i)", yytext, steps++); } .|\n { printf("do nothing"); } %% int main(int argc, char **argv) { yylex(); return(0); } Now my problem is that also strings like 12342welcome( are beeing "marked" as beeing functions ... what am i doing wrong here ? the default route .|\n is said to do nothing, so why does he matches also digits with my function catching example ? best regards! |