GNU bug report logs - #22241
25.0.50; etags Ruby parser problems

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sat, 26 Dec 2015 04:00:02 UTC

Severity: normal

Found in version 25.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #53 received at 22241 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: dgutov <at> yandex.ru
Cc: 22241 <at> debbugs.gnu.org
Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems
Date: Sun, 31 Jan 2016 20:01:15 +0200
> Date: Sun, 31 Jan 2016 05:37:03 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 22241 <at> debbugs.gnu.org
> 
> > Second: a minor thing. If I remove the space after '=', 'ABC =4' doesn't 
> > get recorded.
> 
> Will fix.

But that was a trap, wasn't it?  What can legitimately follow the '+',
in addition to whitespace?  (It's amazing, but among all the gazillion
references to Ruby, I cannot easily find a formal description of its
syntax.)  According to this rare gem:

  https://en.wikibooks.org/wiki/Ruby_Programming/Syntax

(assuming I understand what it says), the RHS can be any literal, and
also any constant expression, is that right?  If so, either (a) we
recognize only '^[ \t]([A-Z][a-z0-9_])*[ \t]*=' and get potential
false positives on the likes of

   ABC == SOMETHING
   ABC =< WHATEVER

etc. (are these possible?); or (b) you tell me which characters can
potentially follow the '=' in an assignment of a constant.  My current
best guess for the latter is this:

    " # % \' ( + - < ? [ {
    0 1 2 3 4 5 6 7 8 9
    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

And if we go the latter way, there are still multi-line expressions
that I think are way too much.

Ugh!




This bug report was last modified 9 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.