From 0a725572c2a59675183502407ff620adb06750de Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 31 Dec 2006 14:33:43 +0100 Subject: [PATCH] allow identifiers as repeat count as well. --- lily/parser.yy | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lily/parser.yy b/lily/parser.yy index 2d9cbdf992..8faa457516 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -351,6 +351,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 @@ -855,9 +856,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); } ; @@ -2135,6 +2136,14 @@ bare_unsigned: } ; +unsigned_number: + bare_unsigned { $$ = scm_from_int ($1); } + | NUMBER_IDENTIFIER { + $$ = $1; + } + ; + + exclamations: { $$ = 0; } | exclamations '!' { $$ ++; } -- 2.39.2