From e88ed7e9288a3d4f3159c1d25ea36acefb2775a8 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 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 '!' { $$ ++; } -- 2.39.2