]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lexer.ll
Merge branch 'master' of ssh+git://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / lexer.ll
index 71fb56b385c6d86205a735ed18c2ff0d75afb95c..b444704ea5890bd5b26d26d335a66a4c6a55baa2 100644 (file)
@@ -171,7 +171,9 @@ BOM_UTF8    \357\273\277
   return type;
 }
 
-<INITIAL,chords,lyrics,figures,notes>{BOM_UTF8} {
+   /* Use the trailing context feature. Otherwise, the BOM will not be
+      found if the file starts with an identifier definition. */
+<INITIAL,chords,lyrics,figures,notes>{BOM_UTF8}/.* {
   if (this->lexloc->line_number () != 1 || this->lexloc->column_number () != 0)
     {
       LexerError (_ ("stray UTF-8 BOM encountered").c_str ());
@@ -551,6 +553,8 @@ BOM_UTF8    \357\273\277
                        SCM tag = scm_cdr(s2);
                        if (tag == ly_symbol2scm("empty"))
                                return MARKUP_LIST_HEAD_EMPTY;
+                       else if (tag == ly_symbol2scm ("scheme0"))
+                               return MARKUP_LIST_HEAD_SCM0;
                        else if (tag == ly_symbol2scm ("markup-list0"))
                                return MARKUP_LIST_HEAD_LIST0;
                        else if (tag == ly_symbol2scm ("scheme0-markup-list1"))
@@ -558,7 +562,7 @@ BOM_UTF8    \357\273\277
                        else if (tag == ly_symbol2scm ("scheme0-scheme1-markup-list2"))
                                return MARKUP_LIST_HEAD_SCM0_SCM1_LIST2;
                        else {
-                               programming_error ("no parser tag defined for this markup signature"); 
+                               programming_error ("no parser tag defined for this markup list signature"); 
                                ly_display_scm (s);
                                assert(false);
                        }