]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2661: parser.yy: remove `fraction'
authorDavid Kastrup <dak@gnu.org>
Sat, 14 Jul 2012 09:19:59 +0000 (11:19 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 20 Jul 2012 05:54:35 +0000 (07:54 +0200)
Previously the parser recognized fractions as well as the lexer.  The effect
was that in certain contexts it was possible to use spaces around the slash.

This necessitated lookahead in parsing and is not apparently used anywhere.
It also does not help in making the input look consistent.

lily/parser.yy

index 44284f6178fdc407edf4edf3a0507418f9594826..98ee4ef7028ca97aae685601af97b5d5ccd27eb6 100644 (file)
@@ -475,7 +475,6 @@ If we give names, Bison complains.
 %type <scm> event_function_event
 %type <scm> figure_list
 %type <scm> figure_spec
-%type <scm> fraction
 %type <scm> full_markup
 %type <scm> full_markup_list
 %type <scm> function_arglist
@@ -1550,11 +1549,6 @@ function_arglist_backup:
                $$ = check_scheme_arg (parser, @3,
                                       $3, $1, $2);
        }
-       | function_arglist_backup REPARSE fraction
-       {
-               $$ = check_scheme_arg (parser, @3,
-                                      $3, $1, $2);
-       }
        ;
 
 function_arglist:
@@ -1574,7 +1568,7 @@ function_arglist_common:
                $$ = check_scheme_arg (parser, @3,
                                       $3, $2, $1);
        }
-       | EXPECT_SCM function_arglist_closed_optional fraction
+       | EXPECT_SCM function_arglist_closed_optional FRACTION
        {
                $$ = check_scheme_arg (parser, @3,
                                       $3, $2, $1);
@@ -1713,7 +1707,7 @@ function_arglist_closed_common:
                $$ = check_scheme_arg (parser, @3,
                                       $3, $2, $1);
        }
-       | EXPECT_SCM function_arglist_closed_optional fraction
+       | EXPECT_SCM function_arglist_closed_optional FRACTION
        {
                $$ = check_scheme_arg (parser, @3,
                                       $3, $2, $1);
@@ -2636,13 +2630,6 @@ multiplied_duration:
        }
        ;
 
-fraction:
-       FRACTION { $$ = $1; }
-       | UNSIGNED '/' UNSIGNED {
-               $$ = scm_cons ($1, $3);
-       }
-       ;
-
 dots:
        /* empty */     {
                $$ = 0;