--- /dev/null
+ \version "2.15.9"
+
+#(ly:set-option 'warning-as-error #f)
+
+\header {
+ texidoc = "This input file contains a UTF-8 BOM not at the very beginning,
+ but on the first line after the first byte. LilyPond should gracefully
+ ignore this BOM as specified in RFC 3629, but print a warning."
+}
+
+{ c }
void push_note_state (SCM tab);
void pop_state ();
void LexerError (char const *);
+ void LexerWarning (char const *);
void set_identifier (SCM path, SCM val);
int get_state () const;
bool is_note_state () const;
<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"));
}
Lily_lexer::LexerError (char const *s)
{
if (include_stack_.empty ())
- message (_f ("error at EOF: %s", s) + "\n");
+ non_fatal_error (s, _f ("%s:EOF", s));
else
{
error_level_ |= 1;
}
}
+void
+Lily_lexer::LexerWarning (char const *s)
+{
+ if (include_stack_.empty ())
+ warning (s, _f ("%s:EOF", s));
+ else
+ {
+ Input spot (*lexloc_);
+ spot.warning (s);
+ }
+}
+
char
Lily_lexer::escaped_char (char c) const
{