[TxMt] Re: Use begin marker of a scope to end the previous one

Édouard Gilbert edouard.gilbert at gmail.com
Wed Apr 8 21:11:49 UTC 2009


Sorry about last mail, I clicked “send” instead of “minimize”.

Le 8 avr. 09 à 21:59, Allan Odgaard a écrit :

> On 19 Mar 2009, at 20:10, Édouard Gilbert wrote:
>
>> […]
>> While we’re discussing language grammars, I was wondering if we
>> could hope some lexer-like capabilities in TM2.0 — I to have regexes
>> everywhere in my grammars, they make anything barely readable.
>
> The feature set is sort of closed for 2.0, but there should be 2.1
> etc. so; what exactly do you mean/propose? I realize that idealized
> EBNF looks nicer than a TM grammar, but in practice it is not (IMHO).
>
>> And, on quite but not that much unrelated matters, what would be the
>> better way to match something like:
>>
>> a
>>> I can apply set of rule A
>> b
>>> I can apply set of rule B
>> c
>>
>> My current is […]
>
> I am confused as to the size of your scopes.
>
> Is each letter starting a new scope, so b is nested inside a, and c is
> nested inside b (nested inside a)?


Actually, ‘a’ opens a scope A, ‘b’ both closes A and opens another  
scope B, which is then closed by ’c’.
Note that while I’m interested in scopes, I’m even more interested in  
grammars development.

An actual example could help:
<a # opens a scope for autocompletion of attributes of tag a
	
 > # closes the attributes scope and open a scope for autocompletion  
of every possible child of a

</a> # closes everything.

Writing directly
 >

</a>
is of course meaningless.

A third scope, which opens with <a and closes with </a> might also be  
useful.

Édouard GILBERT
edouard.gilbert at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ?douard Gilbert.vcf
Type: text/directory
Size: 510 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20090408/ce19f8dd/attachment.vcf>
-------------- next part --------------




More information about the textmate mailing list