]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parser.yy
parser.yy: split function_arglist_nonbackup rule into closed and open variants
[lilypond.git] / lily / parser.yy
index 49acd012d51ca0820db2b8cdf3a613aedbdcf901..08e3ed7adf25dd424bd4ae5edb1b6e09ccf6930b 100644 (file)
@@ -481,6 +481,8 @@ If we give names, Bison complains.
 %type <scm> function_arglist_optional
 %type <scm> function_arglist_backup
 %type <scm> function_arglist_nonbackup
+%type <scm> function_arglist_nonbackup_common
+%type <scm> function_arglist_closed_nonbackup
 %type <scm> function_arglist_skip
 %type <scm> function_arglist_bare
 %type <scm> function_arglist_closed
@@ -1309,21 +1311,13 @@ function_arglist_skip:
        ;
 
 
-function_arglist_nonbackup:
+function_arglist_nonbackup_common:
        EXPECT_OPTIONAL EXPECT_PITCH function_arglist pitch_also_in_chords {
                $$ = scm_cons ($4, $3);
        }
        | EXPECT_OPTIONAL EXPECT_DURATION function_arglist_closed duration_length {
                $$ = scm_cons ($4, $3);
        }
-       | EXPECT_OPTIONAL EXPECT_SCM function_arglist embedded_scm_arg_closed
-       {
-               $$ = check_scheme_arg (parser, @4, $4, $3, $2);
-       }
-       | EXPECT_OPTIONAL EXPECT_SCM function_arglist_closed bare_number_closed
-       {
-               $$ = check_scheme_arg (parser, @4, $4, $3, $2);
-       }
        | EXPECT_OPTIONAL EXPECT_SCM function_arglist_closed FRACTION
        {
                $$ = check_scheme_arg (parser, @4, $4, $3, $2);
@@ -1362,6 +1356,29 @@ function_arglist_nonbackup:
        }
        ;
 
+function_arglist_closed_nonbackup:
+       function_arglist_nonbackup_common
+       | EXPECT_OPTIONAL EXPECT_SCM function_arglist embedded_scm_arg_closed
+       {
+               $$ = check_scheme_arg (parser, @4, $4, $3, $2);
+       }
+       | EXPECT_OPTIONAL EXPECT_SCM function_arglist_closed bare_number_closed
+       {
+               $$ = check_scheme_arg (parser, @4, $4, $3, $2);
+       }
+       ;
+
+function_arglist_nonbackup:
+       function_arglist_nonbackup_common
+       | EXPECT_OPTIONAL EXPECT_SCM function_arglist embedded_scm_arg
+       {
+               $$ = check_scheme_arg (parser, @4, $4, $3, $2);
+       }
+       | EXPECT_OPTIONAL EXPECT_SCM function_arglist_closed bare_number
+       {
+               $$ = check_scheme_arg (parser, @4, $4, $3, $2);
+       }
+       ;
 
 function_arglist_keep:
        function_arglist_common
@@ -1630,7 +1647,7 @@ function_arglist_common_minus:
 
 function_arglist_closed:
        function_arglist_closed_common
-       | function_arglist_nonbackup
+       | function_arglist_closed_nonbackup
        ;
 
 function_arglist_closed_common: