From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18653 invoked from network); 9 Aug 1999 08:10:36 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Aug 1999 08:10:36 -0000 Received: (qmail 10370 invoked by alias); 9 Aug 1999 08:10:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7401 Received: (qmail 10363 invoked from network); 9 Aug 1999 08:10:18 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer thoth.mch.sni.de) From: "Andrej Borsenkow" To: "Peter Stephenson" , "Zsh hackers list" Subject: Bug? RE: Un-patch: new pattern matching code Date: Mon, 9 Aug 1999 12:10:14 +0400 Message-ID: <001801bee23e$9c19d160$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <9908061547.AA37737@ibmth.df.unipi.it> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > Anyone who knows any computer science will probably notice that, while it's > pretty much a finite state machine, some states are more finite than > others. In particularly, backtracking on excluded matches, where in > (foo~bar)rod the `bar' only has to match the `foo' and the `rod' is > irrelevant, need some extra state recording, and I have retained the old > trick that eliminates infinite loops and prevents exponential behaviour > when failing to match against things like `(f#o#)#' (the version of perl > here goes into an infinite loop when given `(f*o*)*', so it isn't trivial). > This has meant leaving holes for pointers in the compiled expression, which > ought to work (I've tried to make sure everything is aligned to pointer > size anyway) but is probably the most dubious part of the proceedings. > bor@itsrm2:~%> foo=ab12xy bor@itsrm2:~%> print ${foo/[[:digit:]]#} abxy bor@itsrm2:~%> print ${(S)foo/[[:digit:]]#} ab12xy bor@itsrm2:~%> print ${foo//[[:digit:]]#} abxy bor@itsrm2:~%> print ${(S)foo//[[:digit:]]#} here zsh hangs completely.