]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'release/unstable'
authorGraham Percival <graham@percival-music.ca>
Tue, 20 Sep 2011 23:51:48 +0000 (00:51 +0100)
committerGraham Percival <graham@percival-music.ca>
Tue, 20 Sep 2011 23:51:48 +0000 (00:51 +0100)
VERSION
lily/parser.yy

diff --git a/VERSION b/VERSION
index e6907fbb3b04630e31603270013cacd757929a90..39deb85e8c75d241b0a4bf76c54a29953e828445 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=15
-PATCH_LEVEL=12
+PATCH_LEVEL=13
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.14.2
-VERSION_DEVEL=2.15.11
+VERSION_DEVEL=2.15.12
index df3cd1a58486806ff4e95be24ee83bb718733df0..3a966f13cf31912141f3479554359333a17c31ef 100644 (file)
 deleting them.  Let's hope that a stack overflow doesnt trigger a move
 of the parse stack onto the heap. */
 
-%left PREC_TOP
-%left ADDLYRICS
 %left PREC_BOT
+%nonassoc REPEAT
+%nonassoc ALTERNATIVE
+%left ADDLYRICS
+%left PREC_TOP
 
-%expect 1
 
-/* One shift/reduce problem
+/* The above precedences tackle the shift/reduce problem
 
 1.  \repeat
        \repeat .. \alternative
@@ -327,6 +328,7 @@ If we give names, Bison complains.
 /* Music */
 %type <scm> composite_music
 %type <scm> grouped_music_list
+%type <scm> braced_music_list
 %type <scm> closed_music
 %type <scm> music
 %type <scm> prefix_composite_music
@@ -364,7 +366,6 @@ If we give names, Bison complains.
 %type <outputdef> output_def
 %type <outputdef> paper_block
 
-%type <scm> alternative_music
 %type <scm> generic_prefix_music_scm
 %type <scm> music_list
 %type <scm> absolute_pitch
@@ -996,41 +997,43 @@ music_list:
        }
        ;
 
+braced_music_list:
+       '{' music_list '}'
+       {
+               $$ = scm_reverse_x ($2, SCM_EOL);
+       }
+       ;
+
 music:
        simple_music
        | composite_music
        | MUSIC_IDENTIFIER
        ;
 
-alternative_music:
-       /* empty */ {
-               $$ = SCM_EOL;
-       }
-       | ALTERNATIVE '{' music_list '}' {
-               $$ = scm_reverse_x ($3, SCM_EOL);
-       }
-       ;
-
 
 repeated_music:
-       REPEAT simple_string unsigned_number music alternative_music
+       REPEAT simple_string unsigned_number music
+       {
+               $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, SCM_EOL);
+       }
+       | REPEAT simple_string unsigned_number music ALTERNATIVE braced_music_list
        {
-               $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, $5);
+               $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, $6);
        }
        ;
 
 sequential_music:
-       SEQUENTIAL '{' music_list '}'           {
-               $$ = MAKE_SYNTAX ("sequential-music", @$, scm_reverse_x ($3, SCM_EOL));
+       SEQUENTIAL braced_music_list {
+               $$ = MAKE_SYNTAX ("sequential-music", @$, $2);
        }
-       | '{' music_list '}'            {
-               $$ = MAKE_SYNTAX ("sequential-music", @$, scm_reverse_x ($2, SCM_EOL));
+       | braced_music_list {
+               $$ = MAKE_SYNTAX ("sequential-music", @$, $1);
        }
        ;
 
 simultaneous_music:
-       SIMULTANEOUS '{' music_list '}'{
-               $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_reverse_x ($3, SCM_EOL));
+       SIMULTANEOUS braced_music_list {
+               $$ = MAKE_SYNTAX ("simultaneous-music", @$, $2);
        }
        | DOUBLE_ANGLE_OPEN music_list DOUBLE_ANGLE_CLOSE       {
                $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_reverse_x ($2, SCM_EOL));