Mastering Regular Expressions 2nd Ed.
DIG
dig.list at telkel.net
Wed Jul 24 00:35:18 EDT 2002
Hi, Peter Hansen !
On Tue, Jul 23, 2002 at 10:11:58PM -0400, Peter Hansen wrote:
> Neil Schemenauer wrote:
> >
> > Regular expressions work much better if you use them for lexical
> > analysis rather than for parsing.
>
> Would you please expand on that for those of us who are not computer
> scientists and/or who do not understand the implications of your
> statement?
I am not Neil Schemenauer <nas at python.ca>. And I am not a computer scientist (sorry ! :-)), but in my opinion, Tom Harris (tomh at optiscan.com, Software Engineer) already (Wed, Jul 24, 2002 at 11:24:36AM +1000) answered you (by asking right questions):
* On Wed, Jul 24, 2002 at 11:24:36AM +1000, Tom Harris wrote:
*
* [...] Lexical analysis is tokenisation, parsing is making sense of the
* tokens, is that correct? Is the moral to leave logic to the programming
* language, not try to use regexes to di it? [...]
Yes, it is.
Regards,
--
DIG (Dmitri I GOULIAEV)
More information about the Python-list
mailing list