[TxMt] Lout language definition?
Allan Odgaard
throw-away-1 at macromates.com
Sun Aug 13 22:53:11 UTC 2006
On 7/8/2006, at 15:08, Alaric Snell-Pym wrote:
> Has anyone thought about a language definition for the Lout document
> formatting system?
>
> I may write one myself, but I'm a bit nervous about it since Lout has
> an awkwardly wide range of ways of indicating the beginnings and ends
> of things.
You can use look-ahead and look-behind in both the begin and end
patterns in a language grammar.
So for example a paragraph would end when the next one starts, or a
blank line, calling for a rule like:
{ name = "meta.paragraph.lout";
begin = "^@PP$";
end = "(?^(@PP)?$)";
}
Here the paragraph ends either when the line is blank or just
contains @PP, but it does not parse the actual line.
More information about the textmate
mailing list