[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22241: 25.0.50; etags Ruby parser problems

From: Dmitry Gutov
Subject: bug#22241: 25.0.50; etags Ruby parser problems
Date: Mon, 1 Feb 2016 11:24:38 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

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

And there isn't one! Ruby is magical that way.

According to this rare gem:


(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


=< 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]