Very basic question about Flex

"[email protected]" <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Hi everyone,

i've started to read the lex and yacc book and the bison and flex book. 
now in the first example they have the following code:

%{
/**
  * First example program for flex
  *
  */
%}

%%

is |
am |
are |
where |
was |
be |
being |
been |
do |
does |
did |
should |
can |
could |
has |
have |
had |
go { printf("%s is a verb\n", yytext); }

[a-zA-Z]+ { printf("%s is not a verb", yytext); }

.|\n { ECHO; /* normal default anyway */ }

%%

int main(int argc, char **argv)
{
     yylex();
}

Now my question is when i enter one of the verbs it's working normaly 
like expected, but when i enter for example 234someword i also get the 
messsage %s is not a verb but i've no rule saying that, i've only 
[a-zA-Z]+ to catch this situation, why does he also react on word that 
begin with a number ??


best regards!




_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.