[TxMt] Re: Regexp generator for language grammars wanted

Luke Daley ld at ldaley.com
Sun Sep 21 23:33:08 UTC 2008


On 22/09/2008, at 6:57 AM, Hans-Jörg Bibiko wrote:

> Hi,
>
> I do not know whether I can remember correctly but I believe that
> someone mentioned a generator script for language grammars' regexp of
> a set of fixed names. I mean e.g.:
>
> I have this list of fixed classes:
>
> NSArray
> NSMutableString
> NSMutableArray
> NSCell
> NSCellItem
> NSCoder
>
> and the generator script will output something like this:
>
> NS(Array|Mutable(String|Array)|C(ell(Item)?|oder))

For TM2, it would be nice to not have to do this pretty common step.

Perhaps we could just specify a text file in the bundle with a word  
per line for a certain scope, and TM automagically reads the file and  
optimizes a regex and uses that. This would certainly make  
maintaining the word list easier.

--

LD.




More information about the textmate mailing list