From 026475b5c3b85ebb365569e5212e67e56fcd56f4 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Tue, 21 Feb 2012 20:11:10 +0100 Subject: [PATCH] lexer.ll: Let pop_state preserve extratoken state --- lily/lexer.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lily/lexer.ll b/lily/lexer.ll index 8c016f6405..c2d8b6baef 100644 --- a/lily/lexer.ll +++ b/lily/lexer.ll @@ -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 -- 2.39.2