develooper Front page | perl.perl6.internals | Postings from July 2002

Friendly RE engine warning

From:
Simon Cozens
Date:
July 22, 2002 16:22
Subject:
Friendly RE engine warning
Message ID:
86sn2bu08f.fsf@squash.oucs.ox.ac.uk

I'm currently working on my Shishi parser/RE engine project, which
shares some similarities with what you'll need from the Perl 6 RE
engine. One thing that troubles me about it is that it's a
recursive-descent traversal across a state machine, and if you implement
this in C without a great deal of cleverness, you'll end up with something
which makes it *very* easy for the end-user to blow the call stack and
segfault. I'm driving myself nuts trying to turn an inherently recursive
algorithm into an iterative one. :) (Maybe you could get better results
by converting a Perl RE 6 from NFA to a DFA and use a superposition of
states. But that messes with my head.)

-- 
<gnat> TorgoX: you're rapidly learning, I see, that XML is a fucking
piece of festering shit which has no more justification for walking
God's clean earth than a dung beetle with diarrhoea.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About