]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lexer.ll
Merge branch 'lilypond/translation' of ssh://trettig@git.sv.gnu.org/srv/git/lilypond...
[lilypond.git] / lily / lexer.ll
index 71fb56b385c6d86205a735ed18c2ff0d75afb95c..bec065347b56aa3b055688b69d02e14c5c614986 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 ());
@@ -335,7 +337,7 @@ BOM_UTF8    \357\273\277
        Input hi = here_input();
        hi.step_forward ();
        SCM sval = ly_parse_scm (hi.start (), &n, hi,
-               be_safe_global && is_main_input_);
+               be_safe_global && is_main_input_, parser_);
 
        if (sval == SCM_UNDEFINED)
        {
@@ -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);
                        }