[TxMt] Re: Regexp generator for language grammars wanted
Hans-Jörg Bibiko
bibiko at eva.mpg.de
Mon Sep 22 11:10:55 UTC 2008
On 22.09.2008, at 12:11, Alex Ross wrote:
>> I believe I found a way to do the reverse.
>>
>> Install the attached command, edit a tmLanguage in TM, select a
>> given optimized regexp and invoke that command. It will open a new
>> doc with a sorted list of - hopefully - all matched keywords. I
>> tested it for some of these regexps BUT PLEASE check it whether it
>> works for everything ;)
>>
>>
> Oh, well, it was a
> good exercise.
Yeap ;)
Here comes a slightly improved version. It compiles the regexp only
once (not for each while loop and sub) thus it's a bit faster; and I
fixed [a-zA-Z\|]+? to [^(]+? (I forgot it in the first version)
Maybe one can put both scripts into the Bundle Development bundle?
--Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DeOptimize Regexp Alternations.tmCommand.zip
Type: application/zip
Size: 983 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20080922/5009c56a/attachment.zip>
More information about the textmate
mailing list