From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: Font Locking issue: Need help/advice Date: Fri, 03 Apr 2020 10:27:12 -0800 Message-ID: <86sghke873.fsf@stephe-leake.org> References: <25fe76a8-025a-be67-8a28-3ac711f07766@protonmail.ch> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="101851"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 03 20:28:30 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKR3O-000QL1-1F for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Apr 2020 20:28:30 +0200 Original-Received: from localhost ([::1]:59546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKR3N-0004PZ-1M for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Apr 2020 14:28:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58551) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKR2J-0003LM-96 for emacs-devel@gnu.org; Fri, 03 Apr 2020 14:27:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKR2G-00063V-Rl for emacs-devel@gnu.org; Fri, 03 Apr 2020 14:27:22 -0400 Original-Received: from gateway30.websitewelcome.com ([192.185.150.24]:29513) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jKR2F-0005zT-8T for emacs-devel@gnu.org; Fri, 03 Apr 2020 14:27:19 -0400 Original-Received: from cm12.websitewelcome.com (cm12.websitewelcome.com [100.42.49.8]) by gateway30.websitewelcome.com (Postfix) with ESMTP id 0D47372760 for ; Fri, 3 Apr 2020 13:27:18 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id KR2DjQokm1s2xKR2Dj6Xsb; Fri, 03 Apr 2020 13:27:18 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7M8NskVL9dts1bIQODKzSi+BtA50Rgi0nXk7AWMsWV0=; b=jAPi/9Ufr2e20zKkjGZqCERaP t+7hZsj5H/yNQGVy9m/3Rf718Rz1/BbZUEOTCPfoJiv+17dEp198lwSTfiypTuGcf70+OESvgVsqg CtKiHku//kUMyJBG/gPr3ONMzjXzRTcL8XXp7HyGAN20e/U/8E1bMXrVttUMo3hWudYggdtgeM7B3 T2YFpxMjhDVwErbUu6mqDY4ckxeM3e0tO0kAo3uC88YCDQUKBQuWQwxJOiEYdv5UboipC7CkHDlfL ekyEz/YvuYfclg+B1wL9mlWK2YvCX7BuWmEYLXwa0uQfXn5vw83/h7zUPz96eE3uxz720WE7v++rc WZ21yjWqQ==; Original-Received: from [76.77.182.20] (port=64362 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1jKR2D-000oaN-E7 for emacs-devel@gnu.org; Fri, 03 Apr 2020 12:27:17 -0600 In-Reply-To: <25fe76a8-025a-be67-8a28-3ac711f07766@protonmail.ch> (Serghei Iakovlev's message of "Fri, 03 Apr 2020 12:29:47 +0000") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1jKR2D-000oaN-E7 X-Source-Sender: (Takver4) [76.77.182.20]:64362 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 2 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 192.185.150.24 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:246352 Archived-At: Serghei Iakovlev writes: > I am creating a new mode called zephir-mode [1]. The main goals of > this mode is to provide syntax highlighting, indentation, movement, > navigation support and Imenu for Zephir [2] language. The ELPA package wisi can help here (I'm the author). > Currently I'm working on fontification and faced a strange > behavior. Please see animated GIF I attached to this email to > demonstrate the issue. The code responsible for fontification > demonstrated in GIF is located here [3]. I used GNU Emacs 27.0.90 > to demonstrate and test this issue. This is the kind of thing that made move away from regexp to a true parser for ada-mode, which eventually led to the current wisi package. > I'd like to provide the patterns I'm trying to catch: > > protected foo; > protected static foo; > public bar = 1; > private baz = []; > private baz = [] { set }; > protectd foo { get }; > public static bar = 42; > private static baz = 13 { get }; > private baz = 13 { get, set, toString }; This definitely would be easier with a parser. > - What happens on the GIF? How I can fix this? How to avoid similar > in the future? > > > - In fact, I would like to be able to independently receive the > answer to the question "Why did this happen?" so I'm interesting > on debugging practices. How to debug similar issues? I did not try to answer these, since my real answer is "use wisi". > [2]: https://zephir-lang.com I don't see a grammar there, which is the first step in using wisi. Is there a grammar available somewhere? or one for a similar language, that would be easy to modify? -- -- Stephe