]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lexer.ll
Merge branch 'release/unstable'
[lilypond.git] / lily / lexer.ll
index a9b1d3980ebb4866967996a8c7ec108614aa45b7..c9c3c88ed89cfa9ce9ec2cd3b56a7d24396cb53c 100644 (file)
@@ -199,8 +199,8 @@ BOM_UTF8    \357\273\277
 <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 ());
-      exit (1);
+      LexerWarning (_ ("stray UTF-8 BOM encountered").c_str ());
+      // exit (1);
     }
   debug_output (_ ("Skipping UTF-8 BOM"));
 }
@@ -818,11 +818,16 @@ Lily_lexer::scan_escaped_word (string str)
        SCM sid = lookup_identifier (str);
        if (is_music_function (sid))
        {
+               int funtype = MUSIC_FUNCTION;
+
                yylval.scm = get_music_function_transform (sid);
 
                SCM s = scm_object_property (yylval.scm, ly_symbol2scm ("music-function-signature"));
+               if (scm_is_eq (scm_car (s), ly_lily_module_constant ("scheme-function")))
+                       funtype = SCM_FUNCTION;
+                              
                push_extra_token (EXPECT_NO_MORE_ARGS);
-               for (; scm_is_pair (s); s = scm_cdr (s))
+               for (s = scm_cdr (s); scm_is_pair (s); s = scm_cdr (s))
                {
                        SCM cs = scm_car (s);
                        
@@ -838,7 +843,7 @@ Lily_lexer::scan_escaped_word (string str)
                                push_extra_token (EXPECT_SCM);
                        else programming_error ("Function parameter without type-checking predicate");
                }
-               return MUSIC_FUNCTION;
+               return funtype;
        }
 
        if (sid != SCM_UNDEFINED)