[TxMt] Re: language grammar question

Sean T Allen sean at monkeysnatchbanana.com
Tue Nov 29 07:42:13 UTC 2011


Perfect. Thanks.  

One more after that...

Is there a way to do an end rules that says 'until you see one of these things defined from the repository?

I think there probably there is but i'm having a hard time seeing how you use a pattern from the repository in a begin or end rather than an include.  


On Tuesday, November 29, 2011 at 2:38 AM, Martin Kühl wrote:

> On Tue, Nov 29, 2011 at 08:28, Sean T Allen <sean at monkeysnatchbanana.com (mailto:sean at monkeysnatchbanana.com)> wrote:
> > I'm trying to do a language grammar where i would do something like
> >  
> > xxx start special section
> >  
> > lots of stuff
> > .. more stuff...
> > .. more stuff...
> >  
> > and have
> >  
> > repository = {
> >   special = {
> >     name = 'punctuation.section.special';
> >     begin = '^xxx start special section';
> >     end = '<END OF FILE>';
> >   };
> > };
> >  
> > Is there a way to have an end rule of 'the end of the file'?
>  
> I seem to recall some way to do this but can't seem to find it…
> I suggest trying something like `$(?!\n)`, which would match the end of
> a line that is not followed by a line break.
>  
> HTH,
> Martin
>  
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com (mailto:textmate at lists.macromates.com)
> http://lists.macromates.com/listinfo/textmate
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20111129/07d26933/attachment.html>


More information about the textmate mailing list