]> git.donarmstrong.com Git - lilypond.git/commitdiff
lexer.ll: Let pop_state preserve extratoken state
authorDavid Kastrup <dak@gnu.org>
Tue, 21 Feb 2012 19:11:10 +0000 (20:11 +0100)
committerDavid Kastrup <dak@gnu.org>
Tue, 21 Feb 2012 19:11:10 +0000 (20:11 +0100)
lily/lexer.ll

index 8c016f6405da0c1227162d3ccbe5d53484d6645f..c2d8b6baeff1273520aa7a68eb32492ad286ec3e 100644 (file)
@@ -834,10 +834,20 @@ Lily_lexer::push_note_state (SCM tab)
 void
 Lily_lexer::pop_state ()
 {
+       bool extra = (YYSTATE == extratoken);
+
+       if (extra)
+               yy_pop_state ();
+
        if (YYSTATE == notes || YYSTATE == chords)
                pitchname_tab_stack_ = scm_cdr (pitchname_tab_stack_);
 
        yy_pop_state ();
+
+       if (extra) {
+               hidden_state_ = YYSTATE;
+               yy_push_state (extratoken);
+       }
 }
 
 int