From: David Kastrup Date: Wed, 14 Dec 2011 20:02:34 +0000 (+0100) Subject: parser.yy: allow Scheme in context_mod_list, harmonize error messages. X-Git-Tag: release/2.15.22-1~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=18ee6d2b76431e1ccf2763fa6a24efe0c87533ce;p=lilypond.git parser.yy: allow Scheme in context_mod_list, harmonize error messages. --- diff --git a/lily/parser.yy b/lily/parser.yy index ab0af30f1e..86973f3ae1 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -820,7 +820,7 @@ context_def_spec_body: td->add_context_mod (scm_car (p)); } } else { - PARSER->parser_error (@2, "context-mod expected"); + PARSER->parser_error (@2, _ ("not a context mod")); } } | context_def_spec_body context_mod { @@ -1186,7 +1186,7 @@ context_modification: if (unsmob_context_mod ($2)) $$ = $2; else { - PARSER->parser_error (@2, "context-mod expected"); + PARSER->parser_error (@2, _ ("not a context mod")); $$ = Context_mod ().smobbed_copy (); } } @@ -1214,6 +1214,13 @@ context_mod_list: if (md) unsmob_context_mod ($1)->add_context_mods (md->get_mods ()); } + | context_mod_list embedded_scm { + Context_mod *md = unsmob_context_mod ($2); + if (md) + unsmob_context_mod ($1)->add_context_mods (md->get_mods ()); + else + PARSER->parser_error (@2, _ ("not a context mod")); + } ; composite_music: @@ -3012,7 +3019,7 @@ markup_scm: else if (Text_interface::is_markup_list ($1)) MYBACKUP (MARKUPLIST_IDENTIFIER, $1, @1); else { - PARSER->parser_error (@1, _("markup expected")); + PARSER->parser_error (@1, _ ("not a markup")); MYBACKUP (MARKUP_IDENTIFIER, scm_string (SCM_EOL), @1); } } BACKUP