[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Very basic question about Flex
From: |
Simon Richter |
Subject: |
Re: Very basic question about Flex |
Date: |
Fri, 22 Feb 2019 16:00:18 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
Hi,
On 22.02.19 15:00, address@hidden wrote:
> [a-zA-Z]+ { printf("%s is not a verb", yytext); }
>
> .|\n { ECHO; /* normal default anyway */ }
> 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 ??
The "234" is printed by the "ECHO;" rule, then "someword is not a verb"
is printed by the printf rule, and they appear together on the output
stream.
Simon
signature.asc
Description: OpenPGP digital signature