[TxMt] Re: language grammar question

Martin Kühl martin.kuehl at gmail.com
Tue Nov 29 07:38:28 UTC 2011


On Tue, Nov 29, 2011 at 08:28, Sean T Allen <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


More information about the textmate mailing list