]> git.donarmstrong.com Git - lilypond.git/commitdiff
parser: move FRACTION into embedded_scm_bare_arg
authorDavid Kastrup <dak@gnu.org>
Sat, 16 Nov 2013 13:09:53 +0000 (14:09 +0100)
committerDavid Kastrup <dak@gnu.org>
Tue, 19 Nov 2013 10:45:42 +0000 (11:45 +0100)
It's a closed expression; not having to parse it with separate rules
reduces the amount of cruft in the rules.

lily/parser.yy

index d4af4c163fb6d1bfe52c4c09042908853ec92507..769f934fa76991a3dad1017afee407ec11bb7ef1 100644 (file)
@@ -474,6 +474,7 @@ embedded_scm_bare_arg:
        {
                $$ = parser->lexer_->eval_scm_token ($1);
        }
+       | FRACTION
        | full_markup_list
        | context_modification
        | score_block
@@ -1334,11 +1335,7 @@ grouped_music_list:
  */
 
 function_arglist_nonbackup_common:
-       EXPECT_OPTIONAL EXPECT_SCM function_arglist_nonbackup FRACTION
-       {
-               $$ = check_scheme_arg (parser, @4, $4, $3, $2);
-       }
-       | EXPECT_OPTIONAL EXPECT_SCM function_arglist_nonbackup post_event_nofinger
+       EXPECT_OPTIONAL EXPECT_SCM function_arglist_nonbackup post_event_nofinger
        {
                $$ = check_scheme_arg (parser, @4, $4, $3, $2);
        }
@@ -1638,16 +1635,6 @@ function_arglist_backup:
                        MYBACKUP (NUMBER_IDENTIFIER, $4, @4);
                }
        }
-       | EXPECT_OPTIONAL EXPECT_SCM function_arglist_backup FRACTION
-       {
-               if (scm_is_true (scm_call_1 ($2, $4)))
-               {
-                       $$ = scm_cons ($4, $3);
-               } else {
-                       $$ = scm_cons (loc_on_music (@3, $1), $3);
-                       MYBACKUP (FRACTION, $4, @4);
-               }
-       }
        | EXPECT_OPTIONAL EXPECT_SCM function_arglist_backup '-' UNSIGNED
        {
                SCM n = scm_difference ($5, SCM_UNDEFINED);
@@ -1823,11 +1810,6 @@ function_arglist_common:
                $$ = check_scheme_arg (parser, @3,
                                       $3, $2, $1);
        }
-       | EXPECT_SCM function_arglist_optional FRACTION
-       {
-               $$ = check_scheme_arg (parser, @3,
-                                      $3, $2, $1);
-       }
        | EXPECT_SCM function_arglist_optional post_event_nofinger
        {
                $$ = check_scheme_arg (parser, @3,
@@ -1991,11 +1973,6 @@ function_arglist_closed_common:
                $$ = check_scheme_arg (parser, @3,
                                       $3, $2, $1);
        }
-       | EXPECT_SCM function_arglist_optional FRACTION
-       {
-               $$ = check_scheme_arg (parser, @3,
-                                      $3, $2, $1);
-       }
        | function_arglist_common_reparse REPARSE SCM_ARG
        {
                $$ = check_scheme_arg (parser, @3,
@@ -2525,7 +2502,6 @@ scalar:
        {
                $$ = scm_difference ($2, SCM_UNDEFINED);
        }
-       | FRACTION
        | STRING
        | full_markup
        ;