]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lexer.ll
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond...
[lilypond.git] / lily / lexer.ll
index 71fb2479eec8596df6d390f989aa0b46f9176782..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 ());