From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#22241: 25.0.50; etags Ruby parser problems Date: Mon, 1 Feb 2016 11:24:38 +0300 Message-ID: <56AF1646.9070502@yandex.ru> 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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1454315122 10988 80.91.229.3 (1 Feb 2016 08:25:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Feb 2016 08:25:22 +0000 (UTC) Cc: 22241@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 01 09:25:11 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 1aQ9nK-0002rS-Ky for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Feb 2016 09:25:10 +0100 Original-Received: from localhost ([::1]:45170 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQ9nJ-0000NQ-ER for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Feb 2016 03:25:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQ9nF-0000MP-GI for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2016 03:25:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQ9nC-0001oQ-8G for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2016 03:25:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQ9nC-0001oM-4f for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2016 03:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aQ9nC-0006u7-0k for bug-gnu-emacs@gnu.org; Mon, 01 Feb 2016 03:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Feb 2016 08:25:01 +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.145431508826518 (code B ref 22241); Mon, 01 Feb 2016 08:25:01 +0000 Original-Received: (at 22241) by debbugs.gnu.org; 1 Feb 2016 08:24:48 +0000 Original-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 Original-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 Original-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) Original-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) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0 In-Reply-To: <83r3gx1vdg.fsf@gnu.org> 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:112188 Archived-At: 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.