initial release
[wix.git] / src / indent.g
1
2 // productions which match indentation-balanced text regions; that is,
3 // regions in which the indentation level of all parts of the region
4 // is strictly non-negative relative to the start of the region.
5
6 // A region which is indentation-balanced: no prefix of the region
7 // contains more outdents than indents.
8 Balanced!           = Balanced ~[>><<]
9                     | Balanced >> Balanced <<
10                     | ()
11
12 // A region which is unbalanced: some prefix has more outdents than
13 // indents.  May be faster to match than (~~Balanced).
14 UnBalanced!         = <<
15                     | ~[>><<] UnBalanced
16                     | >> UnBalanced UnBalanced