Re: Very basic question about Flex

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

On 22.02.19 15:00, [email protected] 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

_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEtjuqOJSXmNjSiX3Tfr04e7CZCBEFAlxwDoMACgkQfr04e7CZ
CBGRUQf8DJ+vecpjaZ9C7MejURasbaR2tEWSlCKqPip2K/wQMs5xcrwPV8+ZY0PV
1L8Hk14njie0A9SooeyudTZHDH9bchV7XBGAdz0ZbJJXaLD1k2DqHrYMfIr+X+ZZ
wEbeQo8NHI5ZNmBz9nzesr7l8t0NdxbZMDfKkzkPuyXqXtUboc8dO6OQtT8YbN5O
pmzTLOmtE33DI28N8QtLP2jmNsh6MwV2kmYyPDdO5k85oliH3Ryef+T+Zo41u2Zc
Z0VPcFfneKTkL/jeIs71S/9aHdX00bjnZGWYkFsHBiaJ58XY684ou3f2nri7OuiB
FjILOcs0D3XdLi65xHXBqXYDUDpPtQ==
=ZQEe
-----END PGP SIGNATURE-----
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.