From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#22241: 25.0.50; etags Ruby parser problems Date: Sat, 23 Jan 2016 18:38:06 +0200 Message-ID: <83si1o45g1.fsf@gnu.org> References: <86r3i9hnbt.fsf@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1453567100 15461 80.91.229.3 (23 Jan 2016 16:38:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2016 16:38:20 +0000 (UTC) Cc: 22241@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 23 17:38:09 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aN1CS-0002MT-Hb for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jan 2016 17:38:08 +0100 Original-Received: from localhost ([::1]:57892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN1CR-0006uX-Rs for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Jan 2016 11:38:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN1CN-0006uG-LB for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 11:38:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aN1CM-0002m7-Mc for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 11:38:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aN1CM-0002m3-JR for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 11:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aN1CM-0007cY-Co for bug-gnu-emacs@gnu.org; Sat, 23 Jan 2016 11:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 23 Jan 2016 16:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22241 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22241-submit@debbugs.gnu.org id=B22241.145356707729284 (code B ref 22241); Sat, 23 Jan 2016 16:38:02 +0000 Original-Received: (at 22241) by debbugs.gnu.org; 23 Jan 2016 16:37:57 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 In-reply-to: <86r3i9hnbt.fsf@yandex.ru> (message from Dmitry Gutov on Sat, 26 Dec 2015 05:59:34 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111892 Archived-At: > 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"?