GNU bug report logs -
#22241
25.0.50; etags Ruby parser problems
Previous Next
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 #59 received at 22241 <at> debbugs.gnu.org (full text, mbox):
On 01/31/2016 09:01 PM, Eli Zaretskii wrote:
> But that was a trap, wasn't it?
Almost every feature is a trap, if one considers it long enough. :)
> 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.)
And there isn't one! Ruby is magical that way.
> 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
=< is not a valid operator. You must be thinking of <=.
> etc. (are these possible?); or (b) you tell me which characters can
> potentially follow the '=' in an assignment of a constant.
Why not do it like this:
If 'ABC =' is followed by any character, except for '=' and '>', you
record it as a tag "ABC".
> " # % \' ( + - < ? [ {
> 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.
What about them? Ideally, you'd skip over multi-line expressions, but
you'd have to do that whether you record constants or not.
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.