GNU bug report logs -
#16593
24.3.50; ruby-mode: align chained method calls on multiple lines
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Thu, 30 Jan 2014 04:26:01 UTC
Severity: normal
Tags: patch
Found in version 24.3.50
Fixed in version 24.4
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Tested the patch locally and it works perfectly. IMO this patch should definitely be installed now, given its small scope and the fact it fixes problems in the current code (as well as providing an important customization option).
--
Cheers,
Bozhidar
On Friday, January 31, 2014 at 5:42 AM, Dmitry Gutov wrote:
> On 30.01.2014 16:35, Stefan Monnier wrote:
> > > Warning (smie): Conflict: . </= .
> > > Warning (smie): Conflict: . </= .
> > >
> >
> >
> > The smie-precs->prec2 part of your grammar says that "." = "." (because
> > of the new (assoc ".") you add there).
> >
> > But the BNF part of your grammar says "." < "." (i.e. "foo . bar . baz"
> > is parsed as "foo . (bar . baz)" because of (id "." exp).
> >
>
>
> Fantastic, thanks for the explanation. With (assoc ".") changed to
> (right "."), the warning is gone.
>
> I've also fixed the precedence of "." vs "? :" and modified a test case
> respectively. See the new patch attached.
>
> Do you think it's not too late in the feature freeze to install a change
> like this, or should we wait until the trunk reopens?
>
> We have a decent number of test cases, so it's not like the patch is
> likely to introduce major breakage.
>
> > Apparently there is no more conflict in the BNF in this respect so the
> > disambiguation constraint (assoc ".") that's passed to it is ignored.
> >
>
>
> Without that constraint there, SMIE showed warnings about ambiguities
> between ".", "," and "=". It somehow ignored the associativity, though.
>
> The warnings with the previous patch also were gone when only the second
> one (assoc ".") were changed to (right "."). The first one, in the BNF
> disambiguation part, could be either.
>
> Bozhidar, would you care to test the new patch?
>
>
> Attachments:
> - ruby-chained-calls.diff
>
[Message part 2 (text/html, inline)]
This bug report was last modified 11 years and 117 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.