In the Help for TextMate, the following are given as examples of legal selectors (with explanations of what they mean / match):
text.html.ruby, text.html source.ruby string string.quoted source.php string text.html source.php source.ruby string source.ruby string - string source string, comment
So, operators here are space, comma-space, and space-minus-space. It appears that space has highest priority, then space-minus-space, then comma. (Or so I would presume.) So far, then, it all seems quite coherent; I grok prefix-matching, descendancy, exclusion, and OR (the comma is apparently an OR operator, even though the help rather confusingly seems to describe it as an AND).
Then, in a blog entry (http://blog.macromates.com/2005/introduction-to-scopes/), additional info is given:
(a | b) & c - d
I find that last one incoherent; I don't get where the pieces are or how the operators here fit, priority-wise, with the previously given operators. For example, which of the selectors given in the first list would be a legal substitute for "b" here? And conversely, for which expressions in the first list of legal selectors, if any, could this expression be substituted?
So, my question is: Can I somewhere get a formal coherent definition of the rules of selector syntax?
m.