]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lexer.ll
Doc-de: small updates
[lilypond.git] / lily / lexer.ll
index 4b05b6a22a4297ea4d8a8ecbeeaf7f1f62a991f9..78b647530335db8b81bae575d6bea71e3dadb4fe 100644 (file)
@@ -2,7 +2,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1996--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1996--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
                  Jan Nieuwenhuizen <janneke@gnu.org>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -399,6 +399,10 @@ BOM_UTF8   \357\273\277
        yylval.scm = scm_from_locale_string (s);
        return RESTNAME;
 }
+<chords,notes,figures>q        {
+       return CHORD_REPETITION;
+}
+
 <chords,notes,figures>R                {
        return MULTI_MEASURE_REST;
 }
@@ -830,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
@@ -876,9 +890,9 @@ Lily_lexer::scan_scm_id (SCM sid)
        {
                int funtype = SCM_FUNCTION;
 
-               yylval.scm = get_music_function_transform (sid);
+               yylval.scm = sid;
 
-               SCM s = scm_object_property (yylval.scm, ly_symbol2scm ("music-function-signature"));
+               SCM s = get_music_function_signature (sid);
                SCM cs = scm_car (s);
 
                if (scm_is_pair (cs))
@@ -948,11 +962,7 @@ Lily_lexer::scan_bare_word (string str)
                    yylval.scm = scm_cdr (handle);
                    return CHORD_MODIFIER;
                }
-               if ((chord_repetition_.repetition_symbol_ != SCM_EOL)
-                   && to_boolean (scm_equal_p (chord_repetition_.repetition_symbol_, sym)))
-                       return CHORD_REPETITION;
        }
-
        yylval.scm = ly_string2scm (str);
        return STRING;
 }