X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Lapo Luchini Subject: Re: Limited regex support in newlib cripples syntax highlighting in nano Date: Tue, 02 Sep 2008 08:17:45 +0200 Lines: 28 Message-ID: References: <31c5d6500808010103r1a0c3823p70351cc15fbf1f23 AT mail DOT gmail DOT com> <6910a60808290339k12212730i1ae450dedce7124 AT mail DOT gmail DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.0 In-Reply-To: <6910a60808290339k12212730i1ae450dedce7124@mail.gmail.com> OpenPGP: id=C8F252FB; url=http://www.lapo.it/pgpkey.txt X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reini Urban wrote: > 2008/8/1 Tomi Belan wrote as "Limited regex support in newlib cripples > syntax highlighting in nano" >> Cygwin regex.h implementation doesn't support some special sequences, >> for example \< (beginning of word), \> (end of word) and \b (word >> boundary). This causes a usability bug with the nano editor, which >> uses these sequences extensively in most of its syntax highlighting >> rules. > > Posix regex is much faster then perl-style pcre regex. Syntax > highlighter usually prefer fast over complete. So the term "crippled" > should be used with care. > > See e.g. http://swtch.com/~rsc/regexp/regexp1.html - Regular > Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, > PHP, Python, Ruby, ...) - which complains about the typical POSIX > spencer implementation also. Interesting paper! Judging from the linked efficient implementations, it could be interesting to have TRE library in Cygwin. But judging from our own "man regexp" it should already have back-references (??): "Regexec is largely insensitive to RE complexity except that back references are massively expensive." -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/