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 ());
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)
{
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"))
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);
}