I had less time for it then I figured (family occasion), so it is still in
work... Sorry. The problem is that things interact, so instead of having
half the YACs in I have all of them half-in :-) I'll do my best to send
something reasonable before Brian's talk.
The new indentation seems to be working nicely (production-wise). I'm using
the notation indent(>n) and indent(<n) as a shorthand for "indent(m) where m
> n (or < n)". This nicely solves the problem of requiring a fixed
indentation for all node content while being flexible. I've also used the
'x' notation from Perl on occasion: e.g., "indent(n<8) ::= #x20 x n". Taken
together this made the productions much nicer.
Using this and a distinction between "explicit_comment(n) ::= indent(n) '#'
stuff EOL" and "implicit_comment(n) ::= explicit_comment(n) | empty line" it
seems I can manage to place the comments everywhere without resorting to
"greedy" disambiguation. I'm just using "explicit_comment(<n)" inside a leaf
value and "implicit_comment(*)" anywhere else. The '*' stands for 'any
Some issues which came up, and I'd like your input on before I add them:
- Should I limit the leaf style format to a strict order as implied by
Brian's latest? It is simpler...
- About allowing '-' as a no-op for folded leaf values. That's still a bit
of a wart... How do you feel about reinstating '+', making the default being
'+' for a block and '-' for folded? I agree that '+' for folded would be
rare, but it seems so would '-' for a block... I rather like this solution
as there's no "special cases" involved, and it adds a bit of power.
- I'd like to limit anchors to being words. Just in case we ever want to
enhance them somehow... I don't see it harms anyone.
I'll try to work on it this evening (my time) - about noon your time.