From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Serghei Newsgroups: gmane.emacs.devel Subject: Re: Font Locking issue: Need help/advice Date: Fri, 03 Apr 2020 22:20:31 +0000 Message-ID: References: <25fe76a8-025a-be67-8a28-3ac711f07766@protonmail.ch> <86sghke873.fsf@stephe-leake.org> Reply-To: Serghei Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="116188"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Stephen Leake Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 04 00:22:02 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 1jKUhM-000U3F-Ke for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 00:22:00 +0200 Original-Received: from localhost ([::1]:33248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKUhL-0005AN-M8 for ged-emacs-devel@m.gmane-mx.org; Fri, 03 Apr 2020 18:21:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55723) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKUgM-0004fy-MB for emacs-devel@gnu.org; Fri, 03 Apr 2020 18:21:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKUgL-0007pm-8R for emacs-devel@gnu.org; Fri, 03 Apr 2020 18:20:58 -0400 Original-Received: from mail2.protonmail.ch ([185.70.40.22]:38397) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jKUgK-0007ju-OL for emacs-devel@gnu.org; Fri, 03 Apr 2020 18:20:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=default; t=1585952454; bh=WQ/KAKLoC6gUmhxkRn3N6mCMvbnxXqQXXMpkdGbk4CA=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=OJAOPP+3XY+sq2ljfkxrcFHYjMNd/8cZF64xH+0jXXcX2+UwU8fRcxPPZ54xW07H1 YYbEBbYfD9vg+x1rJcDvrhdD6JTY4C/+9ModQiZkvdRDMoWMOyu0ANphf1EkWwqyYx +iKvp5vRHccW2MXrynEkSPLOwNW48hpYSG9TnaIE= In-Reply-To: <86sghke873.fsf@stephe-leake.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.70.40.22 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:246362 Archived-At: Hello Stephen, > > 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). In this case users will have to run an external process, right? This is a little worrying for me. I would prefer to use the built-in functionality for as long as possible. Partly due to the fact that users are reluctant (and not always successful) installs new software. > > I'd like to provide the patterns I'm trying to catch: > > protected foo; > > protected static foo; > > public bar =3D 1; > > private baz =3D []; > > private baz =3D [] { set }; > > protectd foo { get }; > > public static bar =3D 42; > > private static baz =3D 13 { get }; > > private baz =3D 13 { get, set, toString }; > > This definitely would be easier with a parser. Of course, any LR(k) parser can handle this. But what about SMIE? Won't it be more organic? > I did not try to answer these, since my real answer is "use wisi". In any case, thanks for the answer, I will definitely try this because I enjoy studying things like scanners, parsers, grammars, semantics and so on. -- Serghei