From: Han-Wen Nienhuys Date: Sun, 31 Dec 2006 13:33:43 +0000 (+0100) Subject: allow identifiers as repeat count as well. X-Git-Tag: release/2.11.7-1~15 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=e88ed7e9288a3d4f3159c1d25ea36acefb2775a8;p=lilypond.git allow identifiers as repeat count as well. --- diff --git a/lily/parser.yy b/lily/parser.yy index d895d41d62..7ea90f93da 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -350,6 +350,7 @@ If we give names, Bison complains. %type absolute_pitch %type assignment_id %type bare_number +%type unsigned_number %type bass_figure %type figured_bass_modification %type br_bass_figure @@ -854,9 +855,9 @@ alternative_music: repeated_music: - REPEAT simple_string bare_unsigned music alternative_music + REPEAT simple_string unsigned_number music alternative_music { - $$ = MAKE_SYNTAX ("repeat", @$, $2, scm_int2num ($3), $4, $5); + $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, $5); } ; @@ -2134,6 +2135,14 @@ bare_unsigned: } ; +unsigned_number: + bare_unsigned { $$ = scm_from_int ($1); } + | NUMBER_IDENTIFIER { + $$ = $1; + } + ; + + exclamations: { $$ = 0; } | exclamations '!' { $$ ++; }