From 88278cd226d402224d66e4a4313060ac6e0b5e4d Mon Sep 17 00:00:00 2001 From: David Kastrup <dak@gnu.org> Date: Sat, 14 Jul 2012 11:19:59 +0200 Subject: [PATCH] Issue 2661: parser.yy: remove `fraction' 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 | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/lily/parser.yy b/lily/parser.yy index 44284f6178..98ee4ef702 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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; -- 2.39.5