[TxMt] Re: Language Grammar Problem
Allan Odgaard
mailinglist at textmate.org
Tue Dec 21 09:46:37 UTC 2010
On 19 Dec 2010, at 06:41, AndreBerg wrote:
> […] Because TextMate can't handle multiline regexes I found this problem to be
> unusually hard.
Indeed — it is not possible to handle a line when how it should be parsed is determined on a later line in that file.
> I am also unclear on questions of order within the top level scope
> definition.
> If two grammar patterns apply to one text section equally which one is used?
The first one listed in the patterns array.
> I am also unclear how you can make a regex backreference from an end pattern
> to a capture group in begin pattern or vice versa. (below I assume it is
> backslash-1 but I'm not sure).
Are you asking about: { begin = '<(.*?)>'; end = '</\1>'; } style rules?
> Also is it possible to define rules for one scope, rules for another and
> then say everything else is some third scope without needing to define match
> rules?
No, you would need to make a fallback/complement rule.
More information about the textmate
mailing list