From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 25 22:59:50 2015 Received: (at submit) by debbugs.gnu.org; 26 Dec 2015 03:59:50 +0000 Received: from localhost ([127.0.0.1]:36617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCg1F-0002A5-SV for submit@debbugs.gnu.org; Fri, 25 Dec 2015 22:59:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36356) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCg1E-00029t-9e for submit@debbugs.gnu.org; Fri, 25 Dec 2015 22:59:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCg18-00037I-1s for submit@debbugs.gnu.org; Fri, 25 Dec 2015 22:59:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCg17-00037E-VO for submit@debbugs.gnu.org; Fri, 25 Dec 2015 22:59:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55558) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCg16-00061Z-TW for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 22:59:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aCg13-00036U-ON for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 22:59:40 -0500 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]:36812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aCg13-00036O-HP for bug-gnu-emacs@gnu.org; Fri, 25 Dec 2015 22:59:37 -0500 Received: by mail-wm0-x22e.google.com with SMTP id p187so213406929wmp.1 for ; Fri, 25 Dec 2015 19:59:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:mime-version:content-type; bh=UY4RONVCnnVizfMkiYKH+lUerfgUcNOICuc0Jem4CNM=; b=pDZctI0UYL9GsfgntohOhhmzBHGPGgkl6GPyTUg1KPRCex1bYEqbl15Z9nkq022TvD bZNMoNLTBmVDedpwoUmbi97ZfCJFL3PT18p1vtHCTaLGRWExV1GHpdcsILZlOaO4jrmU eP8ekJuyH+ORpr4GvaJRZxWZdYkXpjJHkoRtQ7seFUnWJpxplLVeQEYIVdVEmM2sIS/w 3GD/9qkDsryvx1q5vHb9xJU/kws7SiOentiWHtyc7TFAC9FlmJLgrOYRDoe64h9wGgJr 0xyjG8iJEaFHIiA7Nf8UKjmr89K1R+EK/fsx28hi8ims/Y1aZ9RjILzjBaU7rx9eYonK ydzA== X-Received: by 10.194.112.130 with SMTP id iq2mr34905077wjb.102.1451102376425; Fri, 25 Dec 2015 19:59:36 -0800 (PST) Received: from axl ([185.105.175.24]) by smtp.gmail.com with ESMTPSA id 79sm902442wmo.7.2015.12.25.19.59.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Dec 2015 19:59:35 -0800 (PST) From: Dmitry Gutov To: bug-gnu-emacs@gnu.org Subject: 25.0.50; etags Ruby parser problems Date: Sat, 26 Dec 2015 05:59:34 +0200 Message-ID: <86r3i9hnbt.fsf@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) In GNU Emacs 25.0.50.5 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7). It's great that we've incorporated some Ruby support, but it has some apparent problems: - Constants are not indexed. - Class methods (def self.foo) are given the wrong name ("self." shouldn't be included). - "class << self" blocks are given a separate entry. - Qualified tag names are never generated. Take this example file: module A class B ABC = 4 def foo! end def self._bar?(abc) end class << self def qux=(tee) end end end end It should have this unqualified index: A B ABC foo! _bar? qux= And the qualified names should look like this: A A::B A::B::ABC A::B#foo! A::B.bar? A::B.qux= Lastly, it would be great if the parser recognized some built-in code-generating methods. Example: def A attr_reader :foo attr_writer :bar attr_accessor :tee alias_method :qux, :tee end should become (the unqualified version): A foo bar= tee tee= qux All attr_* methods can take a variable number of arguments. The parser should take each argument, check that it's a symbol and not a variable (starts with :), and if so, record the corresponding method name. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 25 23:14:03 2015 Received: (at 22241) by debbugs.gnu.org; 26 Dec 2015 04:14:03 +0000 Received: from localhost ([127.0.0.1]:36622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCgF1-0002VA-4o for submit@debbugs.gnu.org; Fri, 25 Dec 2015 23:14:03 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:35412) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCgEz-0002Ua-1S for 22241@debbugs.gnu.org; Fri, 25 Dec 2015 23:14:01 -0500 Received: by mail-wm0-f51.google.com with SMTP id l126so215815859wml.0 for <22241@debbugs.gnu.org>; Fri, 25 Dec 2015 20:14:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=r0VnyKwu3jdCIl0TTZYcCODQj3hr07Hmx5Lm943Aa1E=; b=joM+mWFFMnD/y6GLfyrGEnrYWVsffngPx+zciDf726K4La3d42RZi2gTHzfKFpYLe1 gvjozJNkKHLPf7HRefrkRNM6PMT4blROcCSbRpxdO4qWyXIqTMw5qsliEvGutdkTjrBC GAWD0QDY94e35rNH4OAfFXs90pscVIxdXFlXwyBcctwx7kZZr6bMbM0iZWNq1nSmaAek eIgPmf1HEAvDUK4uTKmcyCMet9xuAFooW8B9UEQQARxup9rA2yeshy14Gidsu8XK6NsD 1UMU9nV/LZbzbjiJXCipAATmfzsYVuh9BNl/wOKrP3VNVIQrTTWq+/7dbhueXaZyjpUm yARg== X-Received: by 10.28.126.77 with SMTP id z74mr39412363wmc.3.1451103235313; Fri, 25 Dec 2015 20:13:55 -0800 (PST) Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id b82sm39444644wmf.9.2015.12.25.20.13.54 for <22241@debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Dec 2015 20:13:54 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: 22241@debbugs.gnu.org References: <86r3i9hnbt.fsf@yandex.ru> From: Dmitry Gutov Message-ID: <567E1401.6040907@yandex.ru> Date: Sat, 26 Dec 2015 06:13:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 MIME-Version: 1.0 In-Reply-To: <86r3i9hnbt.fsf@yandex.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 22241 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 12/26/2015 05:59 AM, Dmitry Gutov wrote: > And the qualified names should look like this: > > ... > A::B.bar? Sorry, this should be "A::B._bar?". From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 25 23:34:59 2015 Received: (at 22241) by debbugs.gnu.org; 26 Dec 2015 04:34:59 +0000 Received: from localhost ([127.0.0.1]:36630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCgZH-00031g-25 for submit@debbugs.gnu.org; Fri, 25 Dec 2015 23:34:59 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:35122) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCgZE-00031S-Jd for 22241@debbugs.gnu.org; Fri, 25 Dec 2015 23:34:57 -0500 Received: by mail-wm0-f51.google.com with SMTP id l126so216040377wml.0 for <22241@debbugs.gnu.org>; Fri, 25 Dec 2015 20:34:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=ErG1tU0XxQ/sh4Y6K9uyLM8kjdamPMa+RIB/qspqxxE=; b=QpbhdRgHw1geV/AiYLWYEQlDJ9JDNC86qYMDMNW5FFjJ2LtaEpEvG3eQ+PPbqOvC2k hG/9lwRv8G71wcs/AfycA+h2RWQ3SkFnuLLr6KyauUmx0rOkyUWzFw09U0vdeyrvyksR MUD7RTWe1LyogA2tcGa4KJ9mc4zF6RasfpGW2quDxaiSO00A89ObNyDz51rlEQIoD2lj 1yBYlhGVYUPZdRnU7ZKfJLdj4/6CECWjgUQrlIRgROBfnHrc+dHE6rY6F6vi5YekG6A2 ipMEgunCzU8ep7LnYUrBIgXI/P28jtj0vfe4/hfYh4x6MIC8LpQi8ALttgAAy+7UZ58j hVZw== X-Received: by 10.28.178.206 with SMTP id b197mr45867705wmf.20.1451104491117; Fri, 25 Dec 2015 20:34:51 -0800 (PST) Received: from [192.168.1.2] ([185.105.175.24]) by smtp.googlemail.com with ESMTPSA id w1sm28518834wmd.2.2015.12.25.20.34.49 for <22241@debbugs.gnu.org> (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Dec 2015 20:34:50 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: 22241@debbugs.gnu.org References: <86r3i9hnbt.fsf@yandex.ru> From: Dmitry Gutov Message-ID: <567E18E7.7070905@yandex.ru> Date: Sat, 26 Dec 2015 06:34:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 MIME-Version: 1.0 In-Reply-To: <86r3i9hnbt.fsf@yandex.ru> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 22241 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) And looking at the existing examples: def ModuleExample.singleton_module_method should translate to "singleton_module_method" as unqualified name, and "ModuleExample.singleton_module_method" as qualified name. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 11:37:57 2016 Received: (at 22241) by debbugs.gnu.org; 23 Jan 2016 16:37:57 +0000 Received: from localhost ([127.0.0.1]:60755 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN1CH-0007cG-JD for submit@debbugs.gnu.org; Sat, 23 Jan 2016 11:37:57 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46494) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN1CG-0007c3-1z for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 11:37:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aN1C7-0002k1-KX for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 11:37:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN1C7-0002jx-H5; Sat, 23 Jan 2016 11:37:47 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2330 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aN1C6-0000KN-PZ; Sat, 23 Jan 2016 11:37:47 -0500 Date: Sat, 23 Jan 2016 18:38:06 +0200 Message-Id: <83si1o45g1.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <86r3i9hnbt.fsf@yandex.ru> (message from Dmitry Gutov on Sat, 26 Dec 2015 05:59:34 +0200) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > From: Dmitry Gutov > Date: Sat, 26 Dec 2015 05:59:34 +0200 > > It's great that we've incorporated some Ruby support, but it has some > apparent problems: I don't speak Ruby. So please give a more detailed spec for the features you want added. I wrote some questions below, but I'm quite sure there are more questions I should ask, but don't know about. So please provide as complete specification for each feature as you possibly can, TIA. > - Constants are not indexed. What is the full syntax of a "constant"? Is it just IDENTIFIER "=" INTEGER-NUMBER ? Is whitespace significant? What about newlines? > - Class methods (def self.foo) are given the wrong name ("self." > shouldn't be included). Is it enough to remove a single "self.", case-sensitive, at the beginning of an identifier? Can there be more than one, like "self.self.SOMETHING"? Your other example, i.e. def ModuleExample.singleton_module_method indicates that anything up to and including the period should be removed, is that correct? Is there only one, or can there be many? Should they all be removed for an unqualified name? > - "class << self" blocks are given a separate entry. What should be done instead? Can't a class be named "<<"? > - Qualified tag names are never generated. (Etags never promised qualified names except for C and derived languages, and also in Java.) How to know when a module's or a class's scope ends? Is it enough to count "end" lines? Can I assume that "end" will always appear by itself on a line? Can I disregard indentation of "end" (and of everything else) when I determine where a scope begins and ends? > A > A::B > A::B::ABC > A::B#foo! > A::B.bar? > A::B.qux= Why did 'foo!' get a '#' instead of a '.', as for '_bar'? Why doesn't "class << self" count as a class scope, and add something to qualified names? > Lastly, it would be great if the parser recognized some built-in > code-generating methods. Example: > > def A > attr_reader :foo > attr_writer :bar > attr_accessor :tee > alias_method :qux, :tee > end > > should become (the unqualified version): > > A > foo > bar= > tee > tee= > qux > > All attr_* methods can take a variable number of arguments. The parser > should take each argument, check that it's a symbol and not a variable > (starts with :), and if so, record the corresponding method name. Why did 'bar' and 'tee' git a '=' appended? Are there any other such "append rules"? From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 13:24:06 2016 Received: (at 22241) by debbugs.gnu.org; 23 Jan 2016 18:24:06 +0000 Received: from localhost ([127.0.0.1]:60787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN2r0-0003RU-9p for submit@debbugs.gnu.org; Sat, 23 Jan 2016 13:24:06 -0500 Received: from mail-lf0-f46.google.com ([209.85.215.46]:35117) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN2qy-0003Qy-Kh for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 13:24:05 -0500 Received: by mail-lf0-f46.google.com with SMTP id c192so64189157lfe.2 for <22241@debbugs.gnu.org>; Sat, 23 Jan 2016 10:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=UwoHbXGcTb00wQC/A7NhXtH//Du477KaHUqJTQFnj10=; b=H2Ht5Vxm2Bk3uoBSfKUX9No0lLRhX+QZYmMjx9y7aDAeJQEycr0wVuAkgAYloT9V0M jcdNx5hCfNRuqWLGN4AhpQoIfJ6i1P/zaFluvyGqxbj2qbuS143HbRmgyQu17XsE1LSh kHJgqadNFRGcXIAr4oo0gHTxU4CYgcE50AmUrXpRYRU3VQHo5SOgoabGnCjlwvnWuXyD FPMdQ9p55hJkILFppAFctmBbhoUPCREq+AbMUxBXTmiU4MZxZxBYJdkZ4jLAed86yEHt Dh6q6BSu/uynUnRe8OZ4XZDD5IQdwpYZuOjpU5bzehoOO8cx/bx+E+/+UrQpFKePRjnQ 5g1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=UwoHbXGcTb00wQC/A7NhXtH//Du477KaHUqJTQFnj10=; b=Whypm24yvuZyvDYE3IEukfUusLpWR46YvA6kIP24nkvra2w3L/Fwdc/pochGFrXQ6N Q6LaAFggd7V7UuGqnZui0eSVrjM7Po4Io7PisPLpkOWD2OFyBnanE0fH1rb0TMXvhkhv q2LdViY1RRY+sPO0IF7KMp8ARzKhQdfMRjk/xGiB4ee1NuKoMuEdI2aki+DXUOnWr0o1 Tn+Hv6OY+NF7zwA43VImIF/tJ4RMy/Wz6ui3JGjt3EPIa4eRRDi0uTXphOD1x7xCWaRS H0XmBonHgf7aruSNdwA8VC82J8V+oEcbcaXcS39f3ArSRB5/75Ofxi6Q1b0jpDkwK2vp uPEg== X-Gm-Message-State: AG10YOSCKr2m60WlyUgkCWM+uNcDRCwIDWgbsNu6PSVl8XwaMSPNd18igpI5FjDuqtCdBA== X-Received: by 10.25.23.85 with SMTP id n82mr3490750lfi.164.1453573438502; Sat, 23 Jan 2016 10:23:58 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id um4sm1558440lbb.1.2016.01.23.10.23.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 23 Jan 2016 10:23:57 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56A3C53D.1050408@yandex.ru> Date: Sat, 23 Jan 2016 21:23:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83si1o45g1.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 01/23/2016 07:38 PM, Eli Zaretskii wrote: > I don't speak Ruby. So please give a more detailed spec for the > features you want added. I wrote some questions below, but I'm quite > sure there are more questions I should ask, but don't know about. So > please provide as complete specification for each feature as you > possibly can, TIA. [...] Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [178.252.127.222 listed in zen.spamhaus.org] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.46 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.46 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 01/23/2016 07:38 PM, Eli Zaretskii wrote: > I don't speak Ruby. So please give a more detailed spec for the > features you want added. I wrote some questions below, but I'm quite > sure there are more questions I should ask, but don't know about. So > please provide as complete specification for each feature as you > possibly can, TIA. [...] Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.46 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [178.252.127.222 listed in zen.spamhaus.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.46 listed in wl.mailspike.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders On 01/23/2016 07:38 PM, Eli Zaretskii wrote: > I don't speak Ruby. So please give a more detailed spec for the > features you want added. I wrote some questions below, but I'm quite > sure there are more questions I should ask, but don't know about. So > please provide as complete specification for each feature as you > possibly can, TIA. There's no actual up-to-date language spec, and when in doubt, I fire up the REPL and try things out (and forget many of the results afterwards). So there's no "detailed spec" in my head. Let me just try my best answering your questions, for now. >> - Constants are not indexed. > > What is the full syntax of a "constant"? Is it just > > IDENTIFIER "=" INTEGER-NUMBER Pretty much. IDENTIFIER should be ALL_CAPS, or CamelCase, with underscores allowed. INTEGER-NUMBER should be just EXPRESSION, because it can be any expression, possibly a multiline one. CamelCase constants usually are assigned some "anonymous class" value, like in the following example: SpecialError = Class.new(StandardError) (Which is a metaprogramming-y way to define the class SpecialError). But you probably shouldn't worry about ALL_CAPS vs CamelCase distinction here, and just treat them the same. > ? Is whitespace significant? What about newlines? No spaces around "=" is fine. Spaces can also be replaced by tabs. A newline before "=" is not allowed. >> - Class methods (def self.foo) are given the wrong name ("self." >> shouldn't be included). > > Is it enough to remove a single "self.", case-sensitive, at the > beginning of an identifier? Can there be more than one, like > "self.self.SOMETHING"? One one "self." is allowed. When you remove it, you should record that SOMETHING is a method defined on the current class (or module). In Java terms, say, it would be like "static" method. The upshot is, it can be called on the class itself, but not on its instance: irb(main):001:0> class C irb(main):002:1> def self.foo irb(main):003:2> 3 irb(main):004:2> end irb(main):005:1> end => nil irb(main):006:0> C.foo => 3 irb(main):007:0> C.new.foo NoMethodError: undefined method `foo' for # So the qualified name of that method should be "C.foo", as opposed to "C#foo" for an instance method. > Your other example, i.e. > > def ModuleExample.singleton_module_method > > indicates that anything up to and including the period should be > removed, is that correct? More or less. This is an "explicit syntax", which is equivalent to using "self.". These two declarations are equivalent: module ModuleExample def ModuleExample.foo end end module ModuleExample def self.foo end end > Is there only one, or can there be many? There can be only one dot there. There could be a method resolution operator (::) in there, I suppose, but I'm not sure if you want to add support for that right now, or ever. > Should they all be removed for an unqualified name? Yes. >> - "class << self" blocks are given a separate entry. > > What should be done instead? Can't a class be named "<<"? A class cannot be named "<<". You should not add that line to the index, but record that the method definitions inside the following scope are defined on the current class or module. These are equivalent: class C def self.foo end end class C class << self def foo end end end >> - Qualified tag names are never generated. > > (Etags never promised qualified names except for C and derived > languages, and also in Java.) OK, that would be a nice bonus, but we can live without it. ctags doesn't define qualified names either. Without qualified names, I suppose you should treat def self.foo end and def foo end and def Class.foo end the same. Only record those as "foo". > How to know when a module's or a class's scope ends? Is it enough to > count "end" lines? Hmm, maybe? I'm guessing etags doesn't really handle heredoc syntax, or multiline strings defined with percent literals (examples here: https://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Literals#.22Here_document.22_notation) The result shouldn't be too bad if you do that, anyway. Except: > Can I assume that "end" will always appear by > itself on a line? Unfortunately, no. It can also be on the same line, after a semicolon (or on any other line, I suppose, but nobody writes Ruby like that). Examples: class SpecialError < StandardError; end or class MyStruct < Struct.new(:a, :b, :c); end (One could also stick a method definition inside that, but I haven't seen that in practice yet). So, either: - 'end' is on a separate line (after ^[ \t]*). - class/module Name[< ]...; end$ 'end' can also be followed by "# some comment" in both cases. > Can I disregard indentation of "end" (and of > everything else) when I determine where a scope begins and ends? Probably, yes. Indentation is not significant in Ruby, but heredocs can mess up the detection of 'end' keywords, so we could use indentation as a way to detect where each scope ends. But if etags doesn't normally do that, let's not go there now. >> A >> A::B >> A::B::ABC >> A::B#foo! >> A::B.bar? >> A::B.qux= > > Why did 'foo!' get a '#' instead of a '.', as for '_bar'? It's common to use '#' in the qualified names of instance methods, in Java, Ruby and JS docstrings. '.' is used for class methods (static methods, in Java), or methods defined on other singleton objects. Examples: http://usejsdoc.org/tags-inline-link.html (search for '#' there) http://stackoverflow.com/questions/5915992/javadoc-writing-links-to-methods http://docs.ruby-lang.org/en/2.1.0/RDoc/Markup.html#class-RDoc::Markup-label-Links (the documentation also says to use ":: for class methods", but let's not do that) > Why doesn't > "class << self" count as a class scope, and add something to qualified > names? It just served to turn 'qux=' into a class (static) method. >> should become (the unqualified version): >> >> A >> foo >> bar= >> tee >> tee= >> qux >> >> All attr_* methods can take a variable number of arguments. The parser >> should take each argument, check that it's a symbol and not a variable >> (starts with :), and if so, record the corresponding method name. > > Why did 'bar' and 'tee' git a '=' appended? Because 'attr_writer :bar' effectively expands to def bar=(val) @bar = val end and 'attr_accessor :tee' expands into def tee @tee end def tee=(val) @tee = val end > Are there any other such "append rules"? There are other macros (any code can define a macro), but let's not worry about them now. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 13:58:51 2016 Received: (at 22241) by debbugs.gnu.org; 23 Jan 2016 18:58:51 +0000 Received: from localhost ([127.0.0.1]:60794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN3Od-0004F9-CB for submit@debbugs.gnu.org; Sat, 23 Jan 2016 13:58:51 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39007) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN3Ob-0004Ex-Jn for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 13:58:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aN3OT-0000UP-93 for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 13:58:44 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN3OT-0000UL-64; Sat, 23 Jan 2016 13:58:41 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3434 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aN3OS-0001f7-FB; Sat, 23 Jan 2016 13:58:40 -0500 Date: Sat, 23 Jan 2016 20:59:00 +0200 Message-Id: <83oacc3yx7.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56A3C53D.1050408@yandex.ru> (message from Dmitry Gutov on Sat, 23 Jan 2016 21:23:57 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Sat, 23 Jan 2016 21:23:57 +0300 > > On 01/23/2016 07:38 PM, Eli Zaretskii wrote: > > > I don't speak Ruby. So please give a more detailed spec for the > > features you want added. I wrote some questions below, but I'm quite > > sure there are more questions I should ask, but don't know about. So > > please provide as complete specification for each feature as you > > possibly can, TIA. > > There's no actual up-to-date language spec, and when in doubt, I fire up > the REPL and try things out (and forget many of the results afterwards). > So there's no "detailed spec" in my head. Let me just try my best > answering your questions, for now. Thanks. I have a couple of follow-ups. > >> - Constants are not indexed. > > > > What is the full syntax of a "constant"? Is it just > > > > IDENTIFIER "=" INTEGER-NUMBER > > Pretty much. IDENTIFIER should be ALL_CAPS, or CamelCase, with > underscores allowed. > > INTEGER-NUMBER should be just EXPRESSION, because it can be any > expression, possibly a multiline one. So I guess I will leave constants out for now: etags has no notion of expressions. > >> - "class << self" blocks are given a separate entry. > > > > What should be done instead? Can't a class be named "<<"? > > A class cannot be named "<<". You should not add that line to the index, > but record that the method definitions inside the following scope are > defined on the current class or module. Is the telltale part "<<" or "self" (or both)? If it's "<<", then are there other such tokens that "invalidate" a class? > > How to know when a module's or a class's scope ends? Is it enough to > > count "end" lines? > > Hmm, maybe? I'm guessing etags doesn't really handle heredoc syntax, or > multiline strings defined with percent literals (examples here: > https://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Literals#.22Here_document.22_notation) > > The result shouldn't be too bad if you do that, anyway. Except: > > > Can I assume that "end" will always appear by > > itself on a line? > > Unfortunately, no. It can also be on the same line, after a semicolon > (or on any other line, I suppose, but nobody writes Ruby like that). > Examples: > > class SpecialError < StandardError; end > > or > > class MyStruct < Struct.new(:a, :b, :c); end Looks complicated, but I will look into this. I hope no identifier can be named "end", as in def foo bar = end end ? > >> A > >> A::B > >> A::B::ABC > >> A::B#foo! > >> A::B.bar? > >> A::B.qux= > > > > Why did 'foo!' get a '#' instead of a '.', as for '_bar'? > > It's common to use '#' in the qualified names of instance methods What part of the source makes 'foo!' an instance method? > > Why did 'bar' and 'tee' git a '=' appended? > > Because 'attr_writer :bar' effectively expands to > > def bar=(val) > @bar = val > end > > and 'attr_accessor :tee' expands into > > def tee > @tee > end > > def tee=(val) > @tee = val > end So you are saying that attr_writer and attr_accessor cause the '=' to be appended? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 14:29:12 2016 Received: (at 22241) by debbugs.gnu.org; 23 Jan 2016 19:29:12 +0000 Received: from localhost ([127.0.0.1]:60801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN3rz-0004yq-S4 for submit@debbugs.gnu.org; Sat, 23 Jan 2016 14:29:12 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:35014) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN3ry-0004ye-MO for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 14:29:11 -0500 Received: by mail-lf0-f52.google.com with SMTP id c192so64640169lfe.2 for <22241@debbugs.gnu.org>; Sat, 23 Jan 2016 11:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=OEE6DjcchmPKRWd1RshvfMFX8XiVGUIQiH9c+R+2LCw=; b=oszN4LdrhHYtgwkQXO0yaSr9qacdqjq9HQNYpU4mfurjGItjNM1uxGABy5Ev/1R4yk hc6dqKnu/mFQT2f4gmnOaPx0bGxONeZcAeNv2GxfHEVyDpq+5/scPYL0afWQ6R48lg1X rcrOfgt2RK668En60gNiOaN1VHmr1V5p/Sj6nu0pp1gaLpkHKHI/5jBSa/mw8bl4we8f Z8RDttCK2fW2FPjstMtBP+3WG2GWe+FK3l2vRJs6MRxQ2KlZ4WZYew6/9qZCVSwU5Es6 TXgo+d5Kx0bFeYrcZVvE3cd6QcuzbS5qOb4qTP5qVwGkdx9zrFRziMsJJ1DBXQHb4RmL kfww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=OEE6DjcchmPKRWd1RshvfMFX8XiVGUIQiH9c+R+2LCw=; b=gpU9le9hmWBYmEf6xhnQQn9eho1IQG9bGiUPMA/cJleUWdyYxcUqbjURJdbL9Yg8fQ Fx7CKJIm8e4lE49eIE81ywaLhuFkL8HnP7Gmf7hPauEW7w3DP7d3os8FJJQ6hCxhI7ED fvi+rWu8YeS5xsZY38Rw+/h/KYyHQySMkFKaJwKhGZu4XhsiIC9H8gLt8WXOOBgxQ87s C96bVpvQJ/VDleSfTz5T7jXhKZYiPm95JAHRhWcN0MkXVkkqk89Nyigusi/luAYsAJyf wzMKNnc/5sUCvOJbOiaN/GkWnNM2qz9zP2KiFlqduMATnl9UywIkhIyVWQliFf//rT4J qpDw== X-Gm-Message-State: AG10YOQN/dDseDrmBGGaD7vA/nKhuszYPRl2h7xkRDdHXWKhQ2Ml5ciq3IteOXnGugrJOQ== X-Received: by 10.25.78.66 with SMTP id c63mr2992146lfb.18.1453577344824; Sat, 23 Jan 2016 11:29:04 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id r202sm1619055lfr.43.2016.01.23.11.29.03 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 23 Jan 2016 11:29:03 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56A3D47E.3030802@yandex.ru> Date: Sat, 23 Jan 2016 22:29:02 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83oacc3yx7.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 01/23/2016 09:59 PM, Eli Zaretskii wrote: > So I guess I will leave constants out for now: etags has no notion of > expressions. That would be a noticeable omission. Can't you just look for [...] Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [178.252.127.222 listed in zen.spamhaus.org] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.52 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.52 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 01/23/2016 09:59 PM, Eli Zaretskii wrote: > So I guess I will leave constants out for now: etags has no notion of > expressions. That would be a noticeable omission. Can't you just look for [...] Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.52 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [178.252.127.222 listed in zen.spamhaus.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.52 listed in wl.mailspike.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders On 01/23/2016 09:59 PM, Eli Zaretskii wrote: > So I guess I will leave constants out for now: etags has no notion of > expressions. That would be a noticeable omission. Can't you just look for ^[ \t]([A-Z][a-z0-9_])[ \t]*=[ \t]* ? Then record the first group, and simply don't look at what's being assigned. The right hand value is an expression, and you need to skip over paired {} and do-end's, but the etags parser has to do that anyway, right? > Is the telltale part "<<" or "self" (or both)? If it's "<<", then are > there other such tokens that "invalidate" a class? It's "class << self" as a whole. Instead of self, there could be a variable, or a class name, but let's ignore those cases for now. If we see "class <<" - it's not a class definition. If it's followed by "self", record the methods inside the scope as class methods. If it's followed by something other than "self"... maybe even skip the following scope altogether. > Looks complicated, but I will look into this. I hope no identifier > can be named "end", as in > > def foo > bar = end > end > > ? No variable can be named 'end'. But 'end' can be a method name (so foo.end is valid syntax). You should also be on the lookout for :end or end:, that's an :end Symbol, not a keyword. In practice, the 'end' keyword is almost always either preceded by ^[ \t]* or by ;[ \t]*. >> It's common to use '#' in the qualified names of instance methods > > What part of the source makes 'foo!' an instance method? An instance method is a "normal" method, i.e. a method you can call on an "instance" of a class. Example: class C def foo end end (That's C#foo). c = C.new # instantiate c.foo # call >> Because 'attr_writer :bar' effectively expands to >> >> def bar=(val) >> @bar = val >> end >> >> and 'attr_accessor :tee' expands into >> >> def tee >> @tee >> end >> >> def tee=(val) >> @tee = val >> end > > So you are saying that attr_writer and attr_accessor cause the '=' to > be appended? They generate a method with the name bar=, yes. To clarify the meaning of this: you can't have '=' in a name of a variable, only at the end of a method name. And if you have 'bar=(val)' defined in class C, it gets called during assignment: class C def bar=(val) @bar = val end def foo @bar * 3 end end c = C.new c.bar = 4 c.foo # => 12 So attr_writer, attr_reader and attr_accessor generate "accessor" methods for the instance variables in the given class. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 15:48:28 2016 Received: (at 22241) by debbugs.gnu.org; 23 Jan 2016 20:48:28 +0000 Received: from localhost ([127.0.0.1]:60824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN56h-0006rt-QV for submit@debbugs.gnu.org; Sat, 23 Jan 2016 15:48:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52916) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN56g-0006re-TO for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 15:48:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aN56W-00076E-LI for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 15:48:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN56W-000767-Hk; Sat, 23 Jan 2016 15:48:16 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3497 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aN56V-0006IX-QH; Sat, 23 Jan 2016 15:48:16 -0500 Date: Sat, 23 Jan 2016 22:48:36 +0200 Message-Id: <83mvrw3tuj.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56A3D47E.3030802@yandex.ru> (message from Dmitry Gutov on Sat, 23 Jan 2016 22:29:02 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Sat, 23 Jan 2016 22:29:02 +0300 > > On 01/23/2016 09:59 PM, Eli Zaretskii wrote: > > > So I guess I will leave constants out for now: etags has no notion of > > expressions. > > That would be a noticeable omission. Can't you just look for > > ^[ \t]([A-Z][a-z0-9_])[ \t]*=[ \t]* > > ? Then record the first group, and simply don't look at what's being > assigned. That's possible, but is it good enough? Does the above regexp necessarily mean it's a constant? > > Is the telltale part "<<" or "self" (or both)? If it's "<<", then are > > there other such tokens that "invalidate" a class? > > It's "class << self" as a whole. Instead of self, there could be a > variable, or a class name, but let's ignore those cases for now. > > If we see "class <<" - it's not a class definition. OK. Thanks for the other info, I will work on this. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 16:43:30 2016 Received: (at 22241) by debbugs.gnu.org; 23 Jan 2016 21:43:30 +0000 Received: from localhost ([127.0.0.1]:60839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN5xy-0008CO-Hi for submit@debbugs.gnu.org; Sat, 23 Jan 2016 16:43:30 -0500 Received: from mail-lf0-f48.google.com ([209.85.215.48]:35304) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aN5xw-0008C7-SJ for 22241@debbugs.gnu.org; Sat, 23 Jan 2016 16:43:29 -0500 Received: by mail-lf0-f48.google.com with SMTP id c192so65493415lfe.2 for <22241@debbugs.gnu.org>; Sat, 23 Jan 2016 13:43:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=93hq/N6lNrkNtbuRxM4YdnGi8pVDYimVPk7J0Sc7NCk=; b=BeStKLLEp4GGbMpEAG7fZFD0nk5h+ky1Njq6sE+OdE7Kg7HPt9iMnGVdSP2TZ2jmcr mUotV9hPsQIXSpb9iHsssxqKA5+MfrO146P6mDSP+HGI4iXiztq0+fKRALj1SzK70g67 E3+BUBwfKwYcRznO4mCOiMfG3MZUO8M9MjLgp+t+SchwB52lEl+xOvKHgnuRN9x7NoBI QNW77jSJJQ0knAewOkmXqfR1xnrtiR3GheWwFpHm7B3ZZ8FwF7162eTmFPawmOZtsVEJ LAVmR1qJTgGCHAutpptlg+1nl455Grd/Pwlng9rEENedcRpt8NnLI4qvcDM3//LeDfcN 1I6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=93hq/N6lNrkNtbuRxM4YdnGi8pVDYimVPk7J0Sc7NCk=; b=XKXjpLBHQ7INFwqeh7rRFQzEJR8DaJksiJbn0sZKe9egNQ+pd9hJl3Es89UC88RlIB jCdyx3ogN5GYGssK56Z8agAZ6eiETluIjS6SvbgH74aWeeSytudlJ62IHUnieMIByoTE saqrtqMbUDhgoQuxE0UJitcJV+h1cRBL8hl3+ywOk+Dod2YDpVjVXYwNAuSTv7yWQlud gW5uv8MTsRd5F8oYGEDy3ZgzyrMDnAD1eZXrn74hxkTeveCAhH5U4XUsEWJfowjpAq5K RCv5+ZxII59i1PqxjPtsOJP/BXDQDu8VyvLzw+UR74UiVWuFZpGXSdYd30yE9uObjrvM FZiw== X-Gm-Message-State: AG10YOQzaoPOQ6n2XqsTugQBXFffp/MF9E25WnKwJ8KJNsbSo+U02kSUW91PDKhoinhtDw== X-Received: by 10.25.157.135 with SMTP id g129mr3568919lfe.45.1453585402765; Sat, 23 Jan 2016 13:43:22 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id l67sm1739007lfi.2.2016.01.23.13.43.21 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 23 Jan 2016 13:43:21 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56A3F3F9.8030404@yandex.ru> Date: Sun, 24 Jan 2016 00:43:21 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83mvrw3tuj.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 01/23/2016 11:48 PM, Eli Zaretskii wrote: >> ^[ \t]([A-Z][a-z0-9_])[ \t]*=[ \t]* ^ I missed a * there. [...] Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [178.252.127.222 listed in zen.spamhaus.org] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.48 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.48 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.1 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 01/23/2016 11:48 PM, Eli Zaretskii wrote: >> ^[ \t]([A-Z][a-z0-9_])[ \t]*=[ \t]* ^ I missed a * there. [...] Content analysis details: (3.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.48 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [178.252.127.222 listed in zen.spamhaus.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.48 listed in wl.mailspike.net] 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (dgutov[at]yandex.ru) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders On 01/23/2016 11:48 PM, Eli Zaretskii wrote: >> ^[ \t]([A-Z][a-z0-9_])[ \t]*=[ \t]* ^ I missed a * there. >> ? Then record the first group, and simply don't look at what's being >> assigned. > > That's possible, but is it good enough? Does the above regexp > necessarily mean it's a constant? I think so. The important point is that its name begins with a capital letter. And we should probably recognize assignments like these: ModuleExample::CONSTANT = 5 The qualified name "ModuleExample::CONSTANT" if at the top level, unqualified name is "CONSTANT". When inside classes, modules or methods, only record the unqualified name; maybe disregard these assignments when inside methods altogether. Thanks in advance. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 24 10:44:32 2016 Received: (at 22241) by debbugs.gnu.org; 24 Jan 2016 15:44:32 +0000 Received: from localhost ([127.0.0.1]:35043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aNMq8-0007Vw-64 for submit@debbugs.gnu.org; Sun, 24 Jan 2016 10:44:32 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38519) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aNMq6-0007Vj-Et for 22241@debbugs.gnu.org; Sun, 24 Jan 2016 10:44:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNMpx-0007GR-VU for 22241@debbugs.gnu.org; Sun, 24 Jan 2016 10:44:25 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNMpx-0007GN-SG; Sun, 24 Jan 2016 10:44:21 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3950 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aNMpx-000805-6P; Sun, 24 Jan 2016 10:44:21 -0500 Date: Sun, 24 Jan 2016 17:44:44 +0200 Message-Id: <8360yj3rtf.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56A3F3F9.8030404@yandex.ru> (message from Dmitry Gutov on Sun, 24 Jan 2016 00:43:21 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Sun, 24 Jan 2016 00:43:21 +0300 > > On 01/23/2016 11:48 PM, Eli Zaretskii wrote: > > >> ^[ \t]([A-Z][a-z0-9_])[ \t]*=[ \t]* > > ^ I missed a * there. > > >> ? Then record the first group, and simply don't look at what's being > >> assigned. > > > > That's possible, but is it good enough? Does the above regexp > > necessarily mean it's a constant? > > I think so. The important point is that its name begins with a capital > letter. > > And we should probably recognize assignments like these: > > ModuleExample::CONSTANT = 5 > > The qualified name "ModuleExample::CONSTANT" if at the top level, > unqualified name is "CONSTANT". When inside classes, modules or methods, > only record the unqualified name; maybe disregard these assignments when > inside methods altogether. OK, thanks. I will see what I can do with this. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 05:53:13 2016 Received: (at 22241) by debbugs.gnu.org; 30 Jan 2016 10:53:13 +0000 Received: from localhost ([127.0.0.1]:41032 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPT9V-0001zE-7a for submit@debbugs.gnu.org; Sat, 30 Jan 2016 05:53:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60028) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPT9T-0001z1-DQ for 22241@debbugs.gnu.org; Sat, 30 Jan 2016 05:53:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPT9L-00023g-1s for 22241@debbugs.gnu.org; Sat, 30 Jan 2016 05:53:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPT9K-00023c-Ub; Sat, 30 Jan 2016 05:53:02 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1656 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aPT9K-0008M0-BS; Sat, 30 Jan 2016 05:53:02 -0500 Date: Sat, 30 Jan 2016 12:52:33 +0200 Message-Id: <83lh77wd8u.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56A3C53D.1050408@yandex.ru> (message from Dmitry Gutov on Sat, 23 Jan 2016 21:23:57 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Sat, 23 Jan 2016 21:23:57 +0300 > > >> - "class << self" blocks are given a separate entry. > > > > What should be done instead? Can't a class be named "<<"? > > A class cannot be named "<<". You should not add that line to the index, > but record that the method definitions inside the following scope are > defined on the current class or module. These are equivalent: > > class C > def self.foo > end > end > > class C > class << self > def foo > end > end > end What about the following snippet: what tags, if any, should it produce for the 'class' line? class << a def inspect '"bar"' end end Exuberant ctags doesn't produce anything for that line, FWIW. Also, in the above example, what should be the class-qualified name of 'inspect'? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 07:21:55 2016 Received: (at 22241) by debbugs.gnu.org; 30 Jan 2016 12:21:55 +0000 Received: from localhost ([127.0.0.1]:41047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPUXL-0005jM-Bd for submit@debbugs.gnu.org; Sat, 30 Jan 2016 07:21:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:47556) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPUXK-0005jA-Ia for 22241@debbugs.gnu.org; Sat, 30 Jan 2016 07:21:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPUXA-0006j1-O9 for 22241@debbugs.gnu.org; Sat, 30 Jan 2016 07:21:49 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPUXA-0006ix-Ko; Sat, 30 Jan 2016 07:21:44 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1795 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aPUX9-000524-Ub; Sat, 30 Jan 2016 07:21:44 -0500 Date: Sat, 30 Jan 2016 14:21:13 +0200 Message-Id: <83k2mrw952.fsf@gnu.org> From: Eli Zaretskii To: dgutov@yandex.ru In-reply-to: <8360yj3rtf.fsf@gnu.org> (message from Eli Zaretskii on Sun, 24 Jan 2016 17:44:44 +0200) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Date: Sun, 24 Jan 2016 17:44:44 +0200 > From: Eli Zaretskii > Cc: 22241@debbugs.gnu.org > > > Cc: 22241@debbugs.gnu.org > > From: Dmitry Gutov > > Date: Sun, 24 Jan 2016 00:43:21 +0300 > > > > On 01/23/2016 11:48 PM, Eli Zaretskii wrote: > > > > >> ^[ \t]([A-Z][a-z0-9_])[ \t]*=[ \t]* > > > > ^ I missed a * there. > > > > >> ? Then record the first group, and simply don't look at what's being > > >> assigned. > > > > > > That's possible, but is it good enough? Does the above regexp > > > necessarily mean it's a constant? > > > > I think so. The important point is that its name begins with a capital > > letter. > > > > And we should probably recognize assignments like these: > > > > ModuleExample::CONSTANT = 5 > > > > The qualified name "ModuleExample::CONSTANT" if at the top level, > > unqualified name is "CONSTANT". When inside classes, modules or methods, > > only record the unqualified name; maybe disregard these assignments when > > inside methods altogether. > > OK, thanks. I will see what I can do with this. Please take a look at the results of commit 25b79d7 on the emacs-25 branch. I think I implemented everything except the optional name qualification. I hope the results are good enough. If you agree, please close the bug. Of course, if there are still bugs, or the implementation doesn't catch some use cases, please show them. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 11:43:56 2016 Received: (at 22241) by debbugs.gnu.org; 30 Jan 2016 16:43:56 +0000 Received: from localhost ([127.0.0.1]:42265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPYcu-0006sV-3y for submit@debbugs.gnu.org; Sat, 30 Jan 2016 11:43:56 -0500 Received: from mail-lb0-f181.google.com ([209.85.217.181]:33316) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPYcs-0006sI-Qg for 22241@debbugs.gnu.org; Sat, 30 Jan 2016 11:43:55 -0500 Received: by mail-lb0-f181.google.com with SMTP id x4so56147054lbm.0 for <22241@debbugs.gnu.org>; Sat, 30 Jan 2016 08:43:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=QDRVF0wFYsFBzR4jGR66EdbIdZwjTAT2D1GaWVzxsVs=; b=C7B+DuzcVdnLEuwe8dQy8LIIZyuCuHVTIHWfLzpnJ1FgOrIrREF+9cZuJmogTRqmQi txQSdDP52bpcJINn9MOC66+K9y9ZJByx890OBiQBDZhU181rt+ZbsdeQqI9RSn4s9qgr DOXjos6jf073+JywLGyB19BX/DvxDpFVTBY9Pvx9gxniSQDjxeJQ60D4OXgzPxuIb8mN 1yFZzoQFVpGDl8qWdQg7zWElKHiDuroeDfWwHgXble8RHQ+ufrp3MCVI0ZQHjAaGiyhy 4vBMeXaTB1Ft2W5algUkrnNOnPI+AQbNeU1i4LACVww73PLoerZ/UJaz4mu6bftuSF7+ ZO4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=QDRVF0wFYsFBzR4jGR66EdbIdZwjTAT2D1GaWVzxsVs=; b=Zez/5hQEEwk9j42UxyQPUEjJzz+UgLYiOWJp3HsRq3Rkgi5AMv0rwkTlszE4916AnJ beo6gl83b+aGoqyGN3Z3tCGl/I1dflK4qhN96FykzpBA6KYmWnRI+kIyhiqLKzdwPs9M KR9sywcyXW3naHorhvX8Bdn3m0DdCPHw+4YH7Mu8XMet7IvV2arSzwinObmurba2rQx+ EU2DhTF8jw5jKENq1gKHTSR/+qs8RXnPBkINnfBWEiGC7pzfzcdWk1K4ODM/kE8j4IMD 09YKT2/h1LtINvXCZc0CiONZ29uU+vZ75F3UsytUj7sQdz6Nren/RNj2xd4iKowxvJ64 Rl2A== X-Gm-Message-State: AG10YOQ+j0kgiYC4pHDuUi8cDhwDrzyzU27R9yNWrhjTyPdJB6yr1gc3PAUKDldtCdJuow== X-Received: by 10.112.137.97 with SMTP id qh1mr5270130lbb.81.1454172228863; Sat, 30 Jan 2016 08:43:48 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id d10sm2885303lfd.11.2016.01.30.08.43.47 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Jan 2016 08:43:47 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83lh77wd8u.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56ACE843.5070401@yandex.ru> Date: Sat, 30 Jan 2016 19:43:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83lh77wd8u.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 01/30/2016 01:52 PM, Eli Zaretskii wrote: > What about the following snippet: what tags, if any, should it produce > for the 'class' line? > > class << a > def inspect > '"bar"' > end > end No tags on the class line. It's not a declaration either, it's another way to define a method named 'inspect' on the value of 'a'. 'a' must be a local variable. > Also, in the above example, what should be the class-qualified name of > 'inspect'? Depends on the value of a. Which would be pretty hard for etags to track, hence my earlier suggestion to skip it: If it's followed by something other than "self"... maybe even skip the following scope altogether. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 17:06:16 2016 Received: (at 22241) by debbugs.gnu.org; 30 Jan 2016 22:06:16 +0000 Received: from localhost ([127.0.0.1]:42334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPdeq-0007gz-KZ for submit@debbugs.gnu.org; Sat, 30 Jan 2016 17:06:16 -0500 Received: from mail-lf0-f54.google.com ([209.85.215.54]:32872) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPdep-0007gm-0Z for 22241@debbugs.gnu.org; Sat, 30 Jan 2016 17:06:15 -0500 Received: by mail-lf0-f54.google.com with SMTP id m1so809455lfg.0 for <22241@debbugs.gnu.org>; Sat, 30 Jan 2016 14:06:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=obIX6HDLLO3eUHqs7zkMRrN+Z3RlfNCidTYVhOQg63Y=; b=OEFeHccQODELCKnplzM7SpSVADdlp95yBz0UNDzweZzAYgdJ4BHhcPqG64XTaPz1tY 0Rke10kx2IK4j89Pl6LM9DY95Dcja1SI+qbbAi8xg4nabCPAsbte69Zj5pAo41t5niKe CG/wum28fAaVmIfutBFAzdyUYgDIoe5XMYC7ry9A0q+QQvzahuCq4cMWQzr/eE4/Y62l 1xUWv3gr54vUkURLxJ2S2y+ObZo/kVNXe57l+yS97EDNjKJurdl/YJaiv9WQbXGECOwS nFWyyX6L2eB13yelhNfiNgXGaBdIREcbyhscAr4YkKZZGAyiZQ+6gNRXu3Z+LMkToMQ/ 6+3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=obIX6HDLLO3eUHqs7zkMRrN+Z3RlfNCidTYVhOQg63Y=; b=XpvzIEAzONs3tbqlIHTE5O16R+ANexvVW1J/cRNDvaV7zq7JF+KxuK7PopfqCLzWhK WoXthOUq/IUpR7YMTypyx5ZcUI8OmtRbnTKwUHRHXFLHS12Wfc3Vti3QxnVkX3OMdilZ +qyMYSgb3B4Y3QVcXG3V7ZSMDijvfjylFCzPDwDeiJTm/pRFrmxNLwzkCA8CJa1M5UAb 64Id4AwNBoQjF7640/I9Sd3rK3FMbSZhZID8I6sis9F6tZ8H/HnCluqRhbojL/5NLzFH 1CWzEjYSJAsQRhHTF6Ct4C3QbfQ2WdZKqqzdPs45ZtCiGqc4MerRFLCk2EBSp2xWl1ED ZaXg== X-Gm-Message-State: AG10YOR3iVShg1zEm1Crsg8SphATR9AjOy9urwjwSJ1IKtIui+UkSorYEEoDkQVgmns71A== X-Received: by 10.25.15.226 with SMTP id 95mr6106945lfp.85.1454191569236; Sat, 30 Jan 2016 14:06:09 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id h75sm2896931lfi.2.2016.01.30.14.06.07 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Jan 2016 14:06:08 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56AD33CF.6060105@yandex.ru> Date: Sun, 31 Jan 2016 01:06:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83k2mrw952.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 01/30/2016 03:21 PM, Eli Zaretskii wrote: > Please take a look at the results of commit 25b79d7 on the emacs-25 > branch. I think I implemented everything except the optional name > qualification. I hope the results are good enough. If you agree, > please close the bug. > > Of course, if there are still bugs, or the implementation doesn't > catch some use cases, please show them. Thank you. First, it doesn't seem like it handles attr_reader, attr_writter, attr_accessor and method_alias, like I asked at the end of the bug report. That line of discussion was somehow dropped. Second: a minor thing. If I remove the space after '=', 'ABC =4' doesn't get recorded. Third, this is tangential, but I don't think anybody uses the .ruby extension for Ruby files (you can see it's not in auto-mode-alist). But maybe someone somewhere will use it for something else, and etags will erroneously parse that file as Ruby? On the other hand, you might want to add *.ru, *.rbw, Rakefile and Thorfile to the list of Ruby file names. I'll be sure to let you know if I notice something else. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 30 22:37:43 2016 Received: (at 22241) by debbugs.gnu.org; 31 Jan 2016 03:37:43 +0000 Received: from localhost ([127.0.0.1]:42460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPipb-0000Mf-8Y for submit@debbugs.gnu.org; Sat, 30 Jan 2016 22:37:43 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55849) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPipY-0000MR-VP for 22241@debbugs.gnu.org; Sat, 30 Jan 2016 22:37:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPipP-0002Km-RJ for 22241@debbugs.gnu.org; Sat, 30 Jan 2016 22:37:35 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPipP-0002Ki-OS; Sat, 30 Jan 2016 22:37:31 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3025 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aPipN-0001q9-SK; Sat, 30 Jan 2016 22:37:31 -0500 Date: Sun, 31 Jan 2016 05:37:03 +0200 Message-Id: <83h9hu4dy8.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56AD33CF.6060105@yandex.ru> (message from Dmitry Gutov on Sun, 31 Jan 2016 01:06:07 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Sun, 31 Jan 2016 01:06:07 +0300 > > First, it doesn't seem like it handles attr_reader, attr_writter, > attr_accessor and method_alias, like I asked at the end of the bug > report. That line of discussion was somehow dropped. Right, that part is not implemented. Perhaps later. Is it terribly important? > Second: a minor thing. If I remove the space after '=', 'ABC =4' doesn't > get recorded. Will fix. > Third, this is tangential, but I don't think anybody uses the .ruby > extension for Ruby files (you can see it's not in auto-mode-alist). But > maybe someone somewhere will use it for something else, and etags will > erroneously parse that file as Ruby? I found that on the Internet, I can try to find that again. > On the other hand, you might want to add *.ru, *.rbw, Rakefile and > Thorfile to the list of Ruby file names. That's easy to add. Should we? > I'll be sure to let you know if I notice something else. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 31 00:43:25 2016 Received: (at 22241) by debbugs.gnu.org; 31 Jan 2016 05:43:25 +0000 Received: from localhost ([127.0.0.1]:42479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPknF-0003Hk-Ev for submit@debbugs.gnu.org; Sun, 31 Jan 2016 00:43:25 -0500 Received: from mail-lb0-f178.google.com ([209.85.217.178]:34460) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPknD-0003HO-CT for 22241@debbugs.gnu.org; Sun, 31 Jan 2016 00:43:23 -0500 Received: by mail-lb0-f178.google.com with SMTP id cl12so59393672lbc.1 for <22241@debbugs.gnu.org>; Sat, 30 Jan 2016 21:43:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Xx5EGszfe0FF+aKY9poELWT54ac7yQbS7mU8kMbhTFc=; b=Swr3V42HHkcc6P4bZnN3Prj2la0VMpMKg3nfJc2uitl8MZhLR0KPF9JSUe16j8AGhf p2ayNSY+yiDMsC9Bu4d+QHdaokpRZghzrZ6tRsLxXzwQtleBKn31dGMfZm4ZMJQJcBXx /hRpww+GVIx8tzDcB839qEhEJhSI1sbD0wc6CG0waVgqSFBSxGI6JMs2jZCjyDuepd22 Jd8Bc1DaLpar7EtNXl7pLaQt0rJhDmht1oEVI/88KRTFmonGTGY4X6Wfg5matLwINPXN bOBk39t/Cz4A+sMulhD25ZN4EWYr5CSGBk2VvpftFHV0Qs6FVjgVm3cbjRWH3t8hf7aw LjIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=Xx5EGszfe0FF+aKY9poELWT54ac7yQbS7mU8kMbhTFc=; b=U25jcTHpy1db7CWFtbGFENzkCWlQPW5MkRJc2Iok8KQd175Jz9bM85agTArESHKWQq XHBYmBPhlOH075UFWRpruU+Dlf2jYW1umhXPHNe5l8VT7NO0D5bYdb8dg6bFl2l24P0r tbzD/t8V3CfUSx2Pkp/eJg4hpQ4AzN4WMSfgCLSZcxXIBjfSintx08Vwq71OsqZHxbaQ FE7V2ELE7UYG9UcgpPlsehWVvqIO2zgWFQJy+jx1B84kKpnCB+AZ7xCthNmpNB2URr0z rMA9t0BxQL/Mht31hqH+ag3fEtQpeoWdEPczNX4e6W1B7eI/XnXDuFJDvmh+H9iEqgZf ukew== X-Gm-Message-State: AG10YOTo+Qo5ZbExM76PrkohZSnngJ9lVnOELtkdhE4+OEFADVWgg+h1TVs6+BALY5GRyw== X-Received: by 10.112.146.34 with SMTP id sz2mr6151909lbb.96.1454218997529; Sat, 30 Jan 2016 21:43:17 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id 84sm3120823lfp.17.2016.01.30.21.43.16 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 30 Jan 2016 21:43:16 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56AD9EF3.3080104@yandex.ru> Date: Sun, 31 Jan 2016 08:43:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83h9hu4dy8.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 01/31/2016 06:37 AM, Eli Zaretskii wrote: > Right, that part is not implemented. Perhaps later. Is it terribly > important? Exuberant Ctags doesn't do it. I suppose it's rather a missing feature than a bug. It's fine if it's not in 25.1, but let's keep the bug open until it's implemented. >> Third, this is tangential, but I don't think anybody uses the .ruby >> extension for Ruby files (you can see it's not in auto-mode-alist). But >> maybe someone somewhere will use it for something else, and etags will >> erroneously parse that file as Ruby? > > I found that on the Internet, I can try to find that again. Please do. >> On the other hand, you might want to add *.ru, *.rbw, Rakefile and >> Thorfile to the list of Ruby file names. > > That's easy to add. Should we? I believe so. *.ru is a bit questionable (it's not an official Ruby extension, and it might be used by some other file formats), but it's used by a very popular Ruby library for web application init scripts, and those can contain different definitions (in practice, mostly constants, although it can have functions defined, if the application is tiny, or somehow exotic). *.rbw is the Windows extension for Ruby programs that don't need the cmd window. Rakefile and Thorfile can also contain definitions (usually constants, but not necessarily just them, in the former, and classes and methods in the latter). From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 31 13:01:52 2016 Received: (at 22241) by debbugs.gnu.org; 31 Jan 2016 18:01:52 +0000 Received: from localhost ([127.0.0.1]:43413 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPwJs-0000Ri-Bg for submit@debbugs.gnu.org; Sun, 31 Jan 2016 13:01:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43537) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPwJr-0000RU-Ct for 22241@debbugs.gnu.org; Sun, 31 Jan 2016 13:01:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPwJj-0003KV-7s for 22241@debbugs.gnu.org; Sun, 31 Jan 2016 13:01:46 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPwJj-0003KR-4i; Sun, 31 Jan 2016 13:01:43 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4145 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aPwJi-0001A0-ED; Sun, 31 Jan 2016 13:01:42 -0500 Date: Sun, 31 Jan 2016 20:01:15 +0200 Message-Id: <83r3gx1vdg.fsf@gnu.org> From: Eli Zaretskii To: dgutov@yandex.ru In-reply-to: <83h9hu4dy8.fsf@gnu.org> (message from Eli Zaretskii on Sun, 31 Jan 2016 05:37:03 +0200) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) > Date: Sun, 31 Jan 2016 05:37:03 +0200 > From: Eli Zaretskii > Cc: 22241@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! From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 31 13:12:04 2016 Received: (at 22241) by debbugs.gnu.org; 31 Jan 2016 18:12:04 +0000 Received: from localhost ([127.0.0.1]:43417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPwTk-0000gE-Bn for submit@debbugs.gnu.org; Sun, 31 Jan 2016 13:12:04 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45258) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aPwTi-0000fk-KU for 22241@debbugs.gnu.org; Sun, 31 Jan 2016 13:12:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPwTY-0005Nj-Gc for 22241@debbugs.gnu.org; Sun, 31 Jan 2016 13:11:57 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42342) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPwTY-0005Nd-D2; Sun, 31 Jan 2016 13:11:52 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4168 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aPwTX-0005XC-M8; Sun, 31 Jan 2016 13:11:52 -0500 Date: Sun, 31 Jan 2016 20:11:26 +0200 Message-Id: <83powh1uwh.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56AD9EF3.3080104@yandex.ru> (message from Dmitry Gutov on Sun, 31 Jan 2016 08:43:15 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Sun, 31 Jan 2016 08:43:15 +0300 > > On 01/31/2016 06:37 AM, Eli Zaretskii wrote: > > > Right, that part is not implemented. Perhaps later. Is it terribly > > important? > > Exuberant Ctags doesn't do it. I suppose it's rather a missing feature > than a bug. > > It's fine if it's not in 25.1, but let's keep the bug open until it's > implemented. Ah, so it _is_ important. But then I'd need a complete specification of what is needed. (And I already smell a tip of an iceberg.) Again, the references are scarce and incomplete, but I already understand that it could be either of the following attr_WHATEVER :foo SOMETHING ; attr_WHATEVER :foo ; ... attr_WHATEVER :foo, :bar; ... Is that true? Are there any other forms, or can the symbol be followed only by a comma, a semi-colon, or whitespece? And what ends a line like that -- a newline, or can it be continued on the next line? > >> Third, this is tangential, but I don't think anybody uses the .ruby > >> extension for Ruby files (you can see it's not in auto-mode-alist). But > >> maybe someone somewhere will use it for something else, and etags will > >> erroneously parse that file as Ruby? > > > > I found that on the Internet, I can try to find that again. > > Please do. Couldn't find it. And it isn't important enough to argue, just tell which file-name extensions to consider Ruby and I will do it. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 01 03:24:48 2016 Received: (at 22241) by debbugs.gnu.org; 1 Feb 2016 08:24:48 +0000 Received: from localhost ([127.0.0.1]:43857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQ9my-0006td-M4 for submit@debbugs.gnu.org; Mon, 01 Feb 2016 03:24:48 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:36152) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQ9mv-0006tN-UM for 22241@debbugs.gnu.org; Mon, 01 Feb 2016 03:24:46 -0500 Received: by mail-lf0-f52.google.com with SMTP id 78so42300741lfy.3 for <22241@debbugs.gnu.org>; Mon, 01 Feb 2016 00:24:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=GO78nFLFKe5V7+jatnH0Kogk7B5J4HO6ZWLZMIZOlYs=; b=cOoS4/Yk8HbKRs7KMbFBlh89JCCP/u/H7MgR7I9Iz8PHedubP4UVGql6bryuLmhVGN vZnen6kkOYSnKdyAShdrHNe1ev5lVRfQK4a/WaBNViekQH8o1zcGgaf6aXc5v/D6+Djg yIvG9jUn2BvPX1xYl66bQm3xUeZcx1q+LkDTt6GP9VyidaqJar+NrjE4cqsacRgQmw95 nMpu/3BI1dNqoO9URipUlf+6gc7+3ksDddgnBv1SYSBMwCyygdDDTyo7HBNY9T3pmXq2 Ksko/Le/Mjt54Rdc1FHA5P+pY2I+XcY/neIXMkGJWNnb3EwiruGzbnwIgFqRCfeatpp+ I7sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=GO78nFLFKe5V7+jatnH0Kogk7B5J4HO6ZWLZMIZOlYs=; b=dWxXHmqF6VbldypuAduE1FRXvmsWzerYY7ntEmUm5LdY3bBN7zb8wz2YQIuNEVmzS4 Oq34xkF4QRfdPKoC3QVm4KsA9S/ykHS+N/hDF56kz7z9HQfE8MRQCFs1VDWFDFRhzFNr Xp/l+TRN2rGW5UgdaqAGGxCMKlXnqXci8WeED5fC+kT2PcJQixcuTILJuYXWYmF2JyZD MwU6jbBGaas6UAVppVnQD/RyJTSjW5tTmFu6l+QNq38OFdKv+0BQ7I9mWygqAQbWbNYu Wib+W7Ggw/EiWRB6QVk2Z07NfJ0FHE88lYy2pgUSjsEUPfMarG6K6YKW8WIrYf94J/xE sgFQ== X-Gm-Message-State: AG10YOQbtayoLxpWqYkf9v5sJunL8uRGQbDoR9HiBRgyTCnZd5ZII4psuP8V+aTMdWMrTw== X-Received: by 10.25.212.11 with SMTP id l11mr8033345lfg.118.1454315079985; Mon, 01 Feb 2016 00:24:39 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id ax1sm3908829lbc.20.2016.02.01.00.24.39 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Feb 2016 00:24:39 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <83r3gx1vdg.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56AF1646.9070502@yandex.ru> 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 MIME-Version: 1.0 In-Reply-To: <83r3gx1vdg.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 01 03:40:55 2016 Received: (at 22241) by debbugs.gnu.org; 1 Feb 2016 08:40:55 +0000 Received: from localhost ([127.0.0.1]:43862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQA2Z-0007HS-3X for submit@debbugs.gnu.org; Mon, 01 Feb 2016 03:40:55 -0500 Received: from mail-lf0-f43.google.com ([209.85.215.43]:33718) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQA2X-0007HB-Bo for 22241@debbugs.gnu.org; Mon, 01 Feb 2016 03:40:53 -0500 Received: by mail-lf0-f43.google.com with SMTP id m1so16052619lfg.0 for <22241@debbugs.gnu.org>; Mon, 01 Feb 2016 00:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=SWguTvZARl3hoLlDnO2VyUNppcJFVtJGr5nC+nIoeaw=; b=ROt/DA2oSrs22YU+kOcD8cbRUFoTL7Ip9Ru3R2UE2q31mOkm5IglbYTRTwQLWOUhzs ijBgxrFNd8VXHbX7YOLIHtNQbgyI+QNUeQW2x9WjVIvWJBxWYk9z/IjuR0uVJWJGgeqi Rh7sp1rmVO6kXDPjUkBuhqsYYyF5W/+Sv7RxovhMWt9pOZ4pB110iPANfJigcNP4Ei4k ShaS3Nl9lytJi5Lu5aPtKQtAnVKqxS8LN72rrrxAgM5Ih/ASKYJI3DmCID1aMkCv8jEg AYwzVMtPXwDXyarADd9mH/4R7SImnl7697sTDnXsGTXvIWWWpanpDKLWBllN4GnOQH5v bMPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=SWguTvZARl3hoLlDnO2VyUNppcJFVtJGr5nC+nIoeaw=; b=FtOneB479nmq1TOgKqVOCmWWvsSQd6jZIM1WqXvojZtAGiXljBO6uo6uKf2SSNhR0K +G5vqnnLuKAU0Gq+CB5eU3GH6XElEC4XJPmRhD5BIMAdW8G9tfO+F1jCG0i0KZrPLerv M2JBHF1JkKmkpBgaNXFO4CVpedOEysgpZ1//tQWAc6QWmBUfaZMgSAOMgmuZUPqC82ZG SCfDNJHD37Q8AwOMNfdBxpShxbLwnXtpkveKyL4nXiQkBDbxqzLQ5vYhvyPLIZt1hZ1O s6ED3uz2oQTCnvQohrIicrD/WlVFEKcNVe9OmIpG8n20A/Q0KiPCMHwBtxgC6Y0n1p+j Vd4A== X-Gm-Message-State: AG10YOTlaDduWKNfQ0jtKGXL7dxUFW8+XsbCy+a3olEMm3HYSY1GGigcEOqswwb1s1mJzw== X-Received: by 10.25.84.7 with SMTP id i7mr6227699lfb.44.1454316047567; Mon, 01 Feb 2016 00:40:47 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id tv1sm3880625lbb.4.2016.02.01.00.40.46 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Feb 2016 00:40:46 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56AF1A0E.7080802@yandex.ru> Date: Mon, 1 Feb 2016 11:40:46 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83powh1uwh.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 01/31/2016 09:11 PM, Eli Zaretskii wrote: > Ah, so it _is_ important. It kind of is. But I can open a separate bug for it, if you want. > But then I'd need a complete specification > of what is needed. (And I already smell a tip of an iceberg.) Again, > the references are scarce and incomplete, but I already understand > that it could be either of the following > > attr_WHATEVER :foo > SOMETHING ; attr_WHATEVER :foo ; ... > attr_WHATEVER :foo, :bar; ... > > Is that true? Are there any other forms, or can the symbol be > followed only by a comma, a semi-colon, or whitespece? The newline might also be preceded by a comment, I suppose. But really, if recognizing attr_WHATEVER when it's just one of the instructions on a line presents a noticeable difficulty, you can disregard that case: nobody really does that in practice. Or we can disregard it at least until somebody complains. So you would handle attr_WHATEVER :foo, :bar # comment and probably attr_WHATEVER :bar; (the semicolon is redundant, but hey, it shouldn't be too hard to support) and the most difficult realistic case I can imagine looks like this: attr_WHATEVER :foo, :bar, # comment :qux, :tee > And what ends > a line like that -- a newline, or can it be continued on the next > line? If there's a comma at the end of the current line, the argument list continues on the next one. > Couldn't find it. And it isn't important enough to argue, just tell > which file-name extensions to consider Ruby and I will do it. Let's go with my original suggestions, then: .rb .ru .rbw Rakefile Thorfile Thanks! From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 13:14:00 2016 Received: (at 22241) by debbugs.gnu.org; 2 Feb 2016 18:14:00 +0000 Received: from localhost ([127.0.0.1]:57020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfSi-0007cd-6b for submit@debbugs.gnu.org; Tue, 02 Feb 2016 13:14:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43296) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfSg-0007cN-BQ for 22241@debbugs.gnu.org; Tue, 02 Feb 2016 13:13:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQfSX-0000eu-2z for 22241@debbugs.gnu.org; Tue, 02 Feb 2016 13:13:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56757) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfSW-0000eq-Vk; Tue, 02 Feb 2016 13:13:48 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2227 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aQfSW-0006FC-93; Tue, 02 Feb 2016 13:13:48 -0500 Date: Tue, 02 Feb 2016 20:13:27 +0200 Message-Id: <837finyo8o.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56AF1646.9070502@yandex.ru> (message from Dmitry Gutov on Mon, 1 Feb 2016 11:24:38 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <83r3gx1vdg.fsf@gnu.org> <56AF1646.9070502@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Mon, 1 Feb 2016 11:24:38 +0300 > > Why not do it like this: > > If 'ABC =' is followed by any character, except for '=' and '>', you > record it as a tag "ABC". If you say so. Done. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 13:16:47 2016 Received: (at 22241) by debbugs.gnu.org; 2 Feb 2016 18:16:47 +0000 Received: from localhost ([127.0.0.1]:57027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfVO-0007hE-UM for submit@debbugs.gnu.org; Tue, 02 Feb 2016 13:16:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:44026) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQfVN-0007h3-Ut for 22241@debbugs.gnu.org; Tue, 02 Feb 2016 13:16:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQfVF-0001Al-NO for 22241@debbugs.gnu.org; Tue, 02 Feb 2016 13:16:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQfVF-0001Ah-Jk; Tue, 02 Feb 2016 13:16:37 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2228 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aQfVE-0006aM-Tt; Tue, 02 Feb 2016 13:16:37 -0500 Date: Tue, 02 Feb 2016 20:16:17 +0200 Message-Id: <8360y7yo3y.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56AF1A0E.7080802@yandex.ru> (message from Dmitry Gutov on Mon, 1 Feb 2016 11:40:46 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> <56AF1A0E.7080802@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Mon, 1 Feb 2016 11:40:46 +0300 > > On 01/31/2016 09:11 PM, Eli Zaretskii wrote: > > > Ah, so it _is_ important. > > It kind of is. But I can open a separate bug for it, if you want. > > > But then I'd need a complete specification > > of what is needed. (And I already smell a tip of an iceberg.) Again, > > the references are scarce and incomplete, but I already understand > > that it could be either of the following > > > > attr_WHATEVER :foo > > SOMETHING ; attr_WHATEVER :foo ; ... > > attr_WHATEVER :foo, :bar; ... > > > > Is that true? Are there any other forms, or can the symbol be > > followed only by a comma, a semi-colon, or whitespece? > > The newline might also be preceded by a comment, I suppose. > > But really, if recognizing attr_WHATEVER when it's just one of the > instructions on a line presents a noticeable difficulty, you can > disregard that case: nobody really does that in practice. Or we can > disregard it at least until somebody complains. > > So you would handle > > attr_WHATEVER :foo, :bar # comment > > and probably > > attr_WHATEVER :bar; > > (the semicolon is redundant, but hey, it shouldn't be too hard to support) > > and the most difficult realistic case I can imagine looks like this: > > attr_WHATEVER :foo, :bar, # comment > :qux, :tee OK, this is all implemented, except... > > And what ends > > a line like that -- a newline, or can it be continued on the next > > line? > > If there's a comma at the end of the current line, the argument list > continues on the next one. ...this. If supporting such split definitions is important, it will need a slightly more complex code. > Let's go with my original suggestions, then: > > .rb .ru .rbw Rakefile Thorfile Also done (and doing so exposed a real bug in etags). Please take a look. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 02 14:59:45 2016 Received: (at 22241) by debbugs.gnu.org; 2 Feb 2016 19:59:45 +0000 Received: from localhost ([127.0.0.1]:57103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQh73-0001hY-9X for submit@debbugs.gnu.org; Tue, 02 Feb 2016 14:59:45 -0500 Received: from mail-lb0-f177.google.com ([209.85.217.177]:34458) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQh70-0001hE-U8 for 22241@debbugs.gnu.org; Tue, 02 Feb 2016 14:59:43 -0500 Received: by mail-lb0-f177.google.com with SMTP id cw1so8007638lbb.1 for <22241@debbugs.gnu.org>; Tue, 02 Feb 2016 11:59:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=mdzWSXLWlG49ouwDftrlPF3CqKmfVwhtydxPUuziq5Q=; b=uOYbCw5qssEGEg9B1IitRH0Vr1WD1VWiEsNZYsw8H5kAVr5dG4Y/D8I6TK+b1x9i94 G0x6lORy4/jCWeszHcuPeesqH9WASErzwMgP3HrPtWy65g7eQ3LNRDimn9OSwPlhSGTE YygQs7+QUkBYIWA0vlvB7uUriKgomJgqmFqPgYH3PJIr2v+dYOaAtbUybhnI8ArWXKJv V66ibw3YlsLaQJYvdaFZKHWDRRZdge7j7OjE+vcvVjaVsbb+qvmd9qj4Zf3uOClnuHMA PKXic1MocLaBPanK1jP4Xl/uiWJGxpnEdgvBM70eZzDL9mYV5G5RO6o2H2/44AlaarEy miiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=mdzWSXLWlG49ouwDftrlPF3CqKmfVwhtydxPUuziq5Q=; b=ZGTTjKqDHFzHVuEEgXT7DzDy+mL+ZgRC8niwrFrQoJHZ88i/VgAEREV0B1ni41atX/ wCRGQeTmzW7tstYOmgw+b9Yqgvib8B9V0Y1GA5xzCSE6kVa1goQn7TvzaOOL1HgBqfkG Et/qd2qFZakwWEq3RQ3K+C8H1UyzQ3pKpveYvxeaKohJ7zy6bwj9NQI/5vExmOYdH+NT 3AkoPVNBsqi2ffyOHstRXYihsHPOIvHQJloWWwxIzgaetq42kfCUZXYzc3gjiYoa3dkL wE+Hf8wkX4NqjRKowQhrsx1UyE9ToZ30WSFh51ChoTGyQ45HMxG78UqzAkU3KjGN18uD uteQ== X-Gm-Message-State: AG10YOTK1HGWUEKcWZsmVfGQLVCV2G7SM+RQUmJIERAbS5EW9Y4ckE1l/MQ3npXkc6PkWA== X-Received: by 10.112.140.195 with SMTP id ri3mr11888354lbb.136.1454443176924; Tue, 02 Feb 2016 11:59:36 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id jr10sm427977lbc.42.2016.02.02.11.59.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Feb 2016 11:59:35 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> <56AF1A0E.7080802@yandex.ru> <8360y7yo3y.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56B10AA7.5000103@yandex.ru> Date: Tue, 2 Feb 2016 22:59:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <8360y7yo3y.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 02/02/2016 09:16 PM, Eli Zaretskii wrote: >> So you would handle >> >> attr_WHATEVER :foo, :bar # comment >> >> and probably >> >> attr_WHATEVER :bar; > OK, this is all implemented, except... Thank you. >> If there's a comma at the end of the current line, the argument list >> continues on the next one. > > ...this. If supporting such split definitions is important, it will > need a slightly more complex code. It's basically a multiline function call. Not sure how frequently that is used with attr_* in practice, but in our big project at work, just one out of 190 attr_* declarations is multiline. So, it happens, but in the vast majority of cases the arguments stay on one line. Some projects (like Rails) choose to make several calls instead, as a stylistic choice. I can't really say yet if the lack of support for multiline calls is a significant problem, but it is an omission. Whether to implement it now, or close this bug and wait until another bug report, is up to you. >> .rb .ru .rbw Rakefile Thorfile > > Also done (and doing so exposed a real bug in etags). Thanks! Looks good. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 03 11:26:33 2016 Received: (at 22241) by debbugs.gnu.org; 3 Feb 2016 16:26:33 +0000 Received: from localhost ([127.0.0.1]:58269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR0GH-00044Z-5Y for submit@debbugs.gnu.org; Wed, 03 Feb 2016 11:26:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57979) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR0GF-00044J-DC for 22241@debbugs.gnu.org; Wed, 03 Feb 2016 11:26:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aR0G6-0005lP-S9 for 22241@debbugs.gnu.org; Wed, 03 Feb 2016 11:26:26 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:32852) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR0G6-0005lE-OT; Wed, 03 Feb 2016 11:26:22 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3146 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aR0G5-00081l-Ue; Wed, 03 Feb 2016 11:26:22 -0500 Date: Wed, 03 Feb 2016 18:26:04 +0200 Message-Id: <83bn7xyd43.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56B10AA7.5000103@yandex.ru> (message from Dmitry Gutov on Tue, 2 Feb 2016 22:59:35 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> <56AF1A0E.7080802@yandex.ru> <8360y7yo3y.fsf@gnu.org> <56B10AA7.5000103@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Tue, 2 Feb 2016 22:59:35 +0300 > > >> If there's a comma at the end of the current line, the argument list > >> continues on the next one. > > > > ...this. If supporting such split definitions is important, it will > > need a slightly more complex code. > > It's basically a multiline function call. Not sure how frequently that > is used with attr_* in practice, but in our big project at work, just > one out of 190 attr_* declarations is multiline. > > So, it happens, but in the vast majority of cases the arguments stay on > one line. Some projects (like Rails) choose to make several calls > instead, as a stylistic choice. > > I can't really say yet if the lack of support for multiline calls is a > significant problem, but it is an omission. > > Whether to implement it now, or close this bug and wait until another > bug report, is up to you. I implemented that now. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 03 18:22:03 2016 Received: (at 22241) by debbugs.gnu.org; 3 Feb 2016 23:22:03 +0000 Received: from localhost ([127.0.0.1]:58511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR6kN-0003Kg-0D for submit@debbugs.gnu.org; Wed, 03 Feb 2016 18:22:03 -0500 Received: from mail-lf0-f53.google.com ([209.85.215.53]:33223) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aR6kL-0003KC-5H for 22241@debbugs.gnu.org; Wed, 03 Feb 2016 18:22:01 -0500 Received: by mail-lf0-f53.google.com with SMTP id m1so25488954lfg.0 for <22241@debbugs.gnu.org>; Wed, 03 Feb 2016 15:22:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=ol77MPDwi92dfDWhayczJw0bb5+mrA/UuG2eDhaxxoE=; b=MWWZDwfbomENX8BiPH7s1vLoTmIBB7aTxzxezQgaP3X0b3/c+zWssagjFVMjLlbuqY 7bJCF46B/34smEDu3mg+VJNUcCzoFuNgcaI87Ov8wyMiJdrscc4FSmocMr8QXw5CCFGt FKx73ulA/eQL+/5Way5fArVPKmf5OpwwffWw3gXovvtXI/QxPjb+JSF9dwJTOJ5ddN98 Rbr8BhjyooboVI0TGkgmPpuL9eqWE4dPpmmsrod8PdbP+hH0bD7KlDNUV7OOmoyTa1LW DFwrXPlO/ug3s2ofwoJq3dkKlJ1BTPFSSZ7yYul9P3SJNQSzRgj9pqA/56Orngd8weSP BjCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=ol77MPDwi92dfDWhayczJw0bb5+mrA/UuG2eDhaxxoE=; b=DPvpQqs35+hghzTEr7JhxxvrvSJlqM+2sgXJqAKlcO5yWu3FXrJ5HA1KHq92HqV24u Z+3PMSJnIQ0gKf/4VhH69ot7nggWqRY/AdqyGbsATJKaZjJhvdxp+lefB+sCfWjjrtgg qDslNYaDXYVevu40j1X4VkZ9ibQehRmXb+2oTA8j2RDBQgbPmPdqjm3V9pjpnaAWN5dz jZu/1s3OWOWCwp6QPu9AZWmvJDn35h1AHaQFTBfc4oEVUHVLLFT0r2cVabkfxkrRN36A XyEsDsaqOu4kLtb4uoLvT19KvWjtE6pkxxbh+UCRwHO8cJzwxC5gHx02DohvTPUOucoK jkRw== X-Gm-Message-State: AG10YOQ+Mmb4efZR7K51NvOOuIMH4PjHJEGOGzd2lT0VT+FN2ZvolxLlsxOpebbVBfhoqA== X-Received: by 10.25.210.78 with SMTP id j75mr2097519lfg.101.1454541715246; Wed, 03 Feb 2016 15:21:55 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id wj2sm1148796lbb.5.2016.02.03.15.21.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Feb 2016 15:21:54 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> <56AF1A0E.7080802@yandex.ru> <8360y7yo3y.fsf@gnu.org> <56B10AA7.5000103@yandex.ru> <83bn7xyd43.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56B28B91.4010706@yandex.ru> Date: Thu, 4 Feb 2016 02:21:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83bn7xyd43.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 02/03/2016 07:26 PM, Eli Zaretskii wrote: > I implemented that now. Thanks! One nitpick: attr_WHATEVER :foo, bar will generate the methods for 'foo', and whatever the value of bar is. But bar is not very likely to have the value :bar, so we should only generate the tags for 'foo'. IOW, skip the arguments that are not Ruby Symbols (don't start with a colon). The current implementation treats them the same. The test example looks a bit odd as well, but I'll comment on that in a separate email. From debbugs-submit-bounces@debbugs.gnu.org Wed Feb 03 22:44:07 2016 Received: (at 22241) by debbugs.gnu.org; 4 Feb 2016 03:44:08 +0000 Received: from localhost ([127.0.0.1]:58615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRApz-0002To-Na for submit@debbugs.gnu.org; Wed, 03 Feb 2016 22:44:07 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56146) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRApx-0002T7-Cg for 22241@debbugs.gnu.org; Wed, 03 Feb 2016 22:44:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRApo-0008Je-Fj for 22241@debbugs.gnu.org; Wed, 03 Feb 2016 22:43:59 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRApo-0008Ja-CW; Wed, 03 Feb 2016 22:43:56 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3721 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aRApn-00026A-Uu; Wed, 03 Feb 2016 22:43:56 -0500 Date: Thu, 04 Feb 2016 05:43:40 +0200 Message-Id: <834mdpxhqr.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56B28B91.4010706@yandex.ru> (message from Dmitry Gutov on Thu, 4 Feb 2016 02:21:53 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> <56AF1A0E.7080802@yandex.ru> <8360y7yo3y.fsf@gnu.org> <56B10AA7.5000103@yandex.ru> <83bn7xyd43.fsf@gnu.org> <56B28B91.4010706@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Thu, 4 Feb 2016 02:21:53 +0300 > > One nitpick: > > attr_WHATEVER :foo, bar > > will generate the methods for 'foo', and whatever the value of bar is. > But bar is not very likely to have the value :bar, so we should only > generate the tags for 'foo'. > > IOW, skip the arguments that are not Ruby Symbols (don't start with a > colon). The current implementation treats them the same. Yes, because etags is not supposed to do sensible things with syntactically incorrect programs. I'm not sure I understand the rules, though: is the "no colon, don't tag" rule valid for any symbol following the attr_WHATEVER, or is that applicable only to the 2nd, 3rd, etc. symbols? IOW, what, if anything, should be tagged here: attr_reader foo From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 03:25:00 2016 Received: (at 22241) by debbugs.gnu.org; 4 Feb 2016 08:25:00 +0000 Received: from localhost ([127.0.0.1]:58894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRFDo-0005JV-Li for submit@debbugs.gnu.org; Thu, 04 Feb 2016 03:25:00 -0500 Received: from mail-lf0-f42.google.com ([209.85.215.42]:34181) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRFDo-0005JK-1e for 22241@debbugs.gnu.org; Thu, 04 Feb 2016 03:25:00 -0500 Received: by mail-lf0-f42.google.com with SMTP id j78so30997026lfb.1 for <22241@debbugs.gnu.org>; Thu, 04 Feb 2016 00:24:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=LGwr/dYmc1t7FxepMhYuDXJpO+J8pGHroeObj8nbbXw=; b=dW996Ngk4Bg+DGLjDOPE5DQjUn8siqdC7IOaptMmwjM5S+VvbpVSygTvkXfpRby/R+ 1r6vMHZftUL2uo7ZCjBudQ0XMu7W7/C4GWtUJmdHi7aOYe2D/7ToV/q7kkxt6lrP5Idh j6rKFiNXnGKVsSt+nLYi2f7AbABwlEI01VdVTSL3H52kdxs2tlzdaI81MUtIHizVzi9u Csb4IvDbKQyevsZi27HayZpzyQ2HLsmUUJE7rsOTDp8hbckkQ88/71hc4wIKb56SXLY0 r669YDhulgSd0chNbnO9vRBXT0rhDj6zGNSz9KeePRpuLmbZqUgka+BUuXiFR2u7AuxY Gd4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=LGwr/dYmc1t7FxepMhYuDXJpO+J8pGHroeObj8nbbXw=; b=gS6pB72tVWhgb/5HqSmc8PftisV5ci0aaovp78dYT52EMybd7MLjmho30MSsmutXjL 2jv+bE/dO4KDyaKCUUsvumCpxRa4ugBWjnu7pNWrb4zi4VfKsejgPwz9+OG/4Jr02FVX 04v9N/O0jnuj9CJFqQO0YV04mz2e2mfBjBh2I+SPi0x5KRS0qi1n01yPm7gRYUxxMtD4 hLGLfKlNH8kFWbsiGlq8kwqVajDQeUtS3iyBkMDFh5YuNEiH8aipW4v/Q7KLtzVhVzYc RxD4wbM78kro3VlG6qotRBp/if7fv2hUNpqfpb/6GN8Jy05QFd6MJCQTmJfbLqG4zvMg V8EA== X-Gm-Message-State: AG10YOR+NG+4J9hexYEklz0bW7kwJEGbw3BVLXvjfWg1JEx1VNsgvz1UuYjZpsPxg3lE2g== X-Received: by 10.25.42.18 with SMTP id q18mr2886697lfq.151.1454574294111; Thu, 04 Feb 2016 00:24:54 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id j130sm1354027lfe.23.2016.02.04.00.24.52 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Feb 2016 00:24:52 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> <56AF1A0E.7080802@yandex.ru> <8360y7yo3y.fsf@gnu.org> <56B10AA7.5000103@yandex.ru> <83bn7xyd43.fsf@gnu.org> <56B28B91.4010706@yandex.ru> <834mdpxhqr.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56B30AD4.50501@yandex.ru> Date: Thu, 4 Feb 2016 11:24:52 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <834mdpxhqr.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 02/04/2016 06:43 AM, Eli Zaretskii wrote: >> IOW, skip the arguments that are not Ruby Symbols (don't start with a >> colon). The current implementation treats them the same. > > Yes, because etags is not supposed to do sensible things with > syntactically incorrect programs. This is syntactically correct: class C [:foo, :bar].each do |name| attr_reader name end end > I'm not sure I understand the rules, though: is the "no colon, don't > tag" rule valid for any symbol following the attr_WHATEVER, or is that > applicable only to the 2nd, 3rd, etc. symbols? Any of the arguments. > IOW, what, if > anything, should be tagged here: > > attr_reader foo Just skip it as well. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 12:24:36 2016 Received: (at 22241) by debbugs.gnu.org; 4 Feb 2016 17:24:36 +0000 Received: from localhost ([127.0.0.1]:60541 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRNe0-0004bA-6h for submit@debbugs.gnu.org; Thu, 04 Feb 2016 12:24:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:36300) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRNdy-0004ay-Jg for 22241@debbugs.gnu.org; Thu, 04 Feb 2016 12:24:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aRNdq-0006QS-A8 for 22241@debbugs.gnu.org; Thu, 04 Feb 2016 12:24:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aRNdq-0006QO-6f; Thu, 04 Feb 2016 12:24:26 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4387 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aRNdp-0005fJ-DL; Thu, 04 Feb 2016 12:24:25 -0500 Date: Thu, 04 Feb 2016 19:24:10 +0200 Message-Id: <83k2mkwfr9.fsf@gnu.org> From: Eli Zaretskii To: Dmitry Gutov In-reply-to: <56B30AD4.50501@yandex.ru> (message from Dmitry Gutov on Thu, 4 Feb 2016 11:24:52 +0300) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> <56AF1A0E.7080802@yandex.ru> <8360y7yo3y.fsf@gnu.org> <56B10AA7.5000103@yandex.ru> <83bn7xyd43.fsf@gnu.org> <56B28B91.4010706@yandex.ru> <834mdpxhqr.fsf@gnu.org> <56B30AD4.50501@yandex.ru> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: 22241 Cc: 22241@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) > Cc: 22241@debbugs.gnu.org > From: Dmitry Gutov > Date: Thu, 4 Feb 2016 11:24:52 +0300 > > > I'm not sure I understand the rules, though: is the "no colon, don't > > tag" rule valid for any symbol following the attr_WHATEVER, or is that > > applicable only to the 2nd, 3rd, etc. symbols? > > Any of the arguments. > > > IOW, what, if > > anything, should be tagged here: > > > > attr_reader foo > > Just skip it as well. Done. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 15:06:56 2016 Received: (at 22241-done) by debbugs.gnu.org; 4 Feb 2016 20:06:56 +0000 Received: from localhost ([127.0.0.1]:60662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRQB6-0001bp-HI for submit@debbugs.gnu.org; Thu, 04 Feb 2016 15:06:56 -0500 Received: from mail-lf0-f43.google.com ([209.85.215.43]:36831) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aRQB4-0001bc-8i for 22241-done@debbugs.gnu.org; Thu, 04 Feb 2016 15:06:54 -0500 Received: by mail-lf0-f43.google.com with SMTP id 78so43808561lfy.3 for <22241-done@debbugs.gnu.org>; Thu, 04 Feb 2016 12:06:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=INBFVw48vD5jZKTHwboHyZc3zEgce1lgEiH1yFAx4hc=; b=Fmc7CVl4KxMRcucTpJmM2HtkE530nhi2aFACStb0ZDZDS/vecU+sQleUvruTstl8MG 2rrZYPK32xIZYrfPU7lyI9StBy4ly2EG0PuD9G/zjCywZiw4KG3FoKQ6oZ9Kbvx3xPVu jCB+3ECgl7xohOWqiolV4KjRcjk7U2fE+IuzuPCKYBhGYAzfUDzQUQQ27hcreyJ++C8R DsnI7WR/mZnp2+7dyZMjWAnu3jIOvCBYam0rXr8LBBPfyUPb1mQsh7V6NKzwTwxJ6ZvQ IMkgMehYHtukgSRuI6ctXIMcL/iVMwWYytdTiPxYoZ3Z0UquVAiQoh3AZWzO8gwqKUOF 2W+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=INBFVw48vD5jZKTHwboHyZc3zEgce1lgEiH1yFAx4hc=; b=e3bXpCL1aUMfGOEZRxOi27LXqFc7QO0kRJXCzfzqSw9xJVbVFx637UwT6VXosTHPXY UJkT8PggZ+Xwx7gRcG/x773VGv11Ye0+jxPkDbb228hT1+P7uPRiBIzJNnrJfujqCthi D7JZKUjWxPmMj/5IfM4Z6jVNjScNzNVQEYfp94fbHakoGq7PYiNb6qysZACeMl6pUX3A XJoWGMKen7NpTyD48CWHn+/0KqjCHwUAIAlCrgWNcAfJabEVmmPXQXXCI4m5wfaEES/C JfbE+youZPDr8VCTZq3jtVnQaFSBjt99e+K++gdRB17JZAE2dABYjcm0+GOpe7LgYKw7 IMuw== X-Gm-Message-State: AG10YORbIk2OXod85L6Hh92pmlm1P++Pmzxglj8dUYnx+grzc2ZiGTDohXZGKHqG4eik2Q== X-Received: by 10.25.29.147 with SMTP id d141mr3826682lfd.26.1454616408642; Thu, 04 Feb 2016 12:06:48 -0800 (PST) Received: from [192.168.1.190] ([178.252.127.222]) by smtp.googlemail.com with ESMTPSA id g5sm1742147lfe.42.2016.02.04.12.06.47 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 04 Feb 2016 12:06:47 -0800 (PST) Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems To: Eli Zaretskii References: <86r3i9hnbt.fsf@yandex.ru> <83si1o45g1.fsf@gnu.org> <56A3C53D.1050408@yandex.ru> <83oacc3yx7.fsf@gnu.org> <56A3D47E.3030802@yandex.ru> <83mvrw3tuj.fsf@gnu.org> <56A3F3F9.8030404@yandex.ru> <8360yj3rtf.fsf@gnu.org> <83k2mrw952.fsf@gnu.org> <56AD33CF.6060105@yandex.ru> <83h9hu4dy8.fsf@gnu.org> <56AD9EF3.3080104@yandex.ru> <83powh1uwh.fsf@gnu.org> <56AF1A0E.7080802@yandex.ru> <8360y7yo3y.fsf@gnu.org> <56B10AA7.5000103@yandex.ru> <83bn7xyd43.fsf@gnu.org> <56B28B91.4010706@yandex.ru> <834mdpxhqr.fsf@gnu.org> <56B30AD4.50501@yandex.ru> <83k2mkwfr9.fsf@gnu.org> From: Dmitry Gutov Message-ID: <56B3AF57.5020102@yandex.ru> Date: Thu, 4 Feb 2016 23:06:47 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 MIME-Version: 1.0 In-Reply-To: <83k2mkwfr9.fsf@gnu.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 22241-done Cc: 22241-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 02/04/2016 08:24 PM, Eli Zaretskii wrote: >> Just skip it as well. > > Done. Thanks a lot, marking this as done. From unknown Sun Aug 10 16:46:03 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 04 Mar 2016 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator