An Apology by Deven T. Corzine- December 18, 2000 Everyone:I&39;m sorry about the recent commotion over minor aspects of regex design andimplementation. I stumbled into being the most active participant in anargument nobody wanted, myself included. I realized too late (and with thehelp of a friend) that I had been arguing for a _declarative_ viewpoint,against a prevailing iterative viewpoint. It turns out to be much moredifficult to convey the declarative viewpoint clearly and precisely.I still consider the declarative viewpoint to be...http://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg578.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by Bart Lateur- December 16, 2000 On Fri, 15 Dec 2000 13:42:44 -0700, Kevin Walker wrote:>Deven seems to be advocating thinking about regular expressions >without worrying too much about the implementation, even at a fairly >abstract level.Here&39;s a counter example: aaaabbbbccccdddddbbbbcddddShouldn&39;t a non-greedy matcher b.d, according to the OP&39;s rules,match "bcd", the second matching string That is shorter than the firstmatch. Oh, you want the first match. Well: same thing.It is similar in nature...http://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg577.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by brian d foy- December 16, 2000 On Fri, 15 Dec 2000, Simon Cozens wrote:> On Fri, Dec 15, 2000 at 11:39:08AM -0800, Randal L. Schwartz wrote:> > Tell me how you can do that without breaking much existing code.> > Pssst, Randal, this is Perl 6, not p5p.well, we do have to translate 95% of that code to Perl 6 without a hitch.i imagine that breaking regex behaviour in fovor of something new wouldmake that quite difficult. perhaps that is not what Randal was talkingabout, but it is something to consider.--brian d..http://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg576.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by brian d foy- December 16, 2000 On Fri, 15 Dec 2000, Deven T. Corzine wrote:> If we want the first interesting match, and we&39;re preferring early matches> and short matches, I believe that "bccccd" is more interesting.then write a regex that describes that pattern. the pattern is one b followed by some stuff that is not a d up to one dyou complain because the "." regex special character does not do what youwant. it matches any character except a newline. however, for the caseyou provide, you...http://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg575.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by brian d foy- December 16, 2000 On Fri, 15 Dec 2000, Deven T. Corzine wrote:> On 15 Dec 2000, Randal L. Schwartz wrote:> > > >>>>> "Deven" == Deven T Corzine <deventies.org> writes:> > > > Deven> As for special-case rules, I believe that my proposed modification would> > Deven> REMOVE a special-case semantic rule, at the cost of added complexity at the> > Deven> implementation level. (The cost decision of whether that added complexity> >...http://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg574.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by Tom Christiansen- December 15, 2000 >Nice summary, but I&39;m not buying what you&39;re selling in the elaboration.Then you lose, because I am not allowed to disagree with you anymore.And everyone else has already written you off.And the answer to "what breaks if mimimal matching is overall butmaximal matching is local"--or even, "if we change it all"-- isa zillion programs, including just about any progressive match: while (.(w+)=(S+)g) push $h$1 , $2; I can&39;t wait for that to match the...http://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg573.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by Deven T. Corzine- December 15, 2000 I delayed responding to this message because it was the longest.On Thu, 14 Dec 2000, Tom Christiansen wrote:> >No question that&39;s how it&39;s been implemented. But WHY would anyone want> >such behavior When is it beneficial> > It is beneficial because this is how it&39;s always been, because it> is faster, because it is more expressive, because it is more powerful,> because it is more intuitive, and because it is more perlian.Nice summary, but I&39;m not buying what.http://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg572.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by Simon Cozens- December 15, 2000 On Fri, Dec 15, 2000 at 05:20:35PM -0500, Deven T. Corzine wrote:> It&39;s a pattern, not a program. Yes, it&39;s straightforward to treat it as a> step-by-step procedure for matching that pattern, but by doing so, you lose> something of the gestalt of the whole. You may deal in patterns, but computers deal in programs. There&39;s a reasonGestalt.pm hasn&39;t made it yet.-- Putting a square peg into a round hole can be worthwhile if you don&39;t mind a few shavings. -- Larry Wallhttp://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg571.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by Tom Christiansen- December 15, 2000 >Take. It. To. Private. Email. Please.I&39;m going to do better. I&39;m taking it to devnull.It&39;s not worth my wasting my life over. Nobodyagrees with this guy, so it doesn&39;t matter.--tomhttp://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg570.html Re: Perl 5's "non-greedy" matching can be TOO greedy! by Deven T. Corzine- December 15, 2000 On Fri, 15 Dec 2000, Tom Christiansen wrote:> >At worst, this should take no more than double the amount of time that the> >single pass did, probably less. Hardly a cause to concern ourselves with> >the heat death of the universe.> > Oh really We have shown that for the kind of global overall> analysis that you are asking for, that in the general case, all> possible paths much be taken. You cannot short-circuit, because> you must first consider all...http://www.nntp.perl.org/group/perl.perl6.language.regex/2000/12/msg569.html |