Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(387)

Issue 6399045: parser.yy: remove `fraction' (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 11 months ago by dak
Modified:
6 years, 11 months ago
Reviewers:
Keith
CC:
lilypond-devel_gnu.org
Base URL:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Visibility:
Public.

Description

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.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -15 lines) Patch
M lily/parser.yy View 5 chunks +2 lines, -15 lines 0 comments Download

Messages

Total messages: 5
Keith
It is too unfriendly to say "unexpected '/'" to someone who wrote {\times 2/ 3 ...
6 years, 11 months ago (2012-07-14 21:29:42 UTC) #1
dak
On 2012/07/14 21:29:42, Keith wrote: > It is too unfriendly to say "unexpected '/'" to ...
6 years, 11 months ago (2012-07-15 02:14:41 UTC) #2
Keith
On Sat, 14 Jul 2012 19:14:41 -0700, <dak@gnu.org> wrote: > Do we have evidence of ...
6 years, 11 months ago (2012-07-15 05:07:13 UTC) #3
dak
message: On 2012/07/15 05:07:13, Keith wrote: > On Sat, 14 Jul 2012 19:14:41 -0700, <mailto:dak@gnu.org> ...
6 years, 11 months ago (2012-07-15 09:14:00 UTC) #4
dak
6 years, 11 months ago (2012-07-17 06:50:54 UTC) #5
On 2012/07/15 09:14:00, dak wrote:
> message: On 2012/07/15 05:07:13, Keith wrote:
> > On Sat, 14 Jul 2012 19:14:41 -0700, <mailto:dak@gnu.org> wrote:
> > 
> > > Do we have evidence of people using 2/ 3 anywhere?
> > 
> > I don't know of any scores with spaces alongside the / .
> 
> As far as I know, it has never been documented or demonstrated.  The previous
> support in the parser was more likely than not added because the lexer
> historically did not support fractions in all modes.  That was changed about
> half a year ago without complaints.

Well, "half a year ago" is quite the exaggeration.  Looking for an actual
commit, I can only find
commit 0757febe2084fd8507334987b6f6b524888247c7
Author: David Kastrup <dak@gnu.org>
Date:   Sun May 13 01:23:31 2012 +0200

    Issue 2530: Use fractions rather than Scheme pairs for \scaleDuration, timeS

I thought I remembered also earlier work on this (and I meddled a _lot_ with the
parser regarding fractions), but apparently I had not previously messed with the
_lexer;s_ view of fractions.

So it has just been version 2.15.39 when 2/4 turned into a LilyPond fraction
rather than a numeric expression even in INITIAL state.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b