On Mon, Dec 15, 2008 at 11:25 AM, Trevor Bača <trevorb...@gmail.com> wrote:
> 6. Lily reads the terminal close } brace. Even here, I'm willing to bet, > Lily sees no reason to kill off the explicit named "foo" context. I bet Lily > reads the terminal close } brace and instead simply closes off the original > music *expression*. My guess would be that not until EOF does Lily finally > kill off the original named "foo" context. EOF does not play any role in this. The parsing into trees of music expressions is done beforehand, and the iteration is not connected directly with the input file. Each iterator contains a pointer to the context it delivers events to. This pointer is actually reference counted, and a context is ended when its reference count drops to zero. > ==> naked { } expressions DO NOT cause contexts to be instantiated at the > open { brace and destroyed at the close } brace. Look for descend_to_bottom(). Generally, event chords (rests, notes, lyrics) cause a bottom context (lyrics, voice, chordnames) to be instantiated as child of the current context. The iterator for { } (sequential) will change its context to the one of its child if that child has a deeper level than the current one. so, \new Staff { c d } the iterator for 'c' will create a Voice, the enclosing iterator will change from Staff to Voice, since Voice is deeper nested in the context tree. > This is a super long-winded way of me coming around to Carl's mental model: Try not to form mental models. Use the source instead. -- Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen
_______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel