From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs rendering comparisson between emacs23 and emacs26.3 Date: Sat, 28 Mar 2020 18:03:21 +0300 Message-ID: <835zeo7c92.fsf@gnu.org> References: <86tv2h2vww.fsf@gmail.com> <20200322123818.GB32470@ACM> <87eetk5swm.fsf@gnu.org> <20200326193128.GC14092@ACM> <86d08y4zsx.fsf@gmail.com> <83sghs7qdz.fsf@gnu.org> <7ee94ed4-7a11-90bd-df69-c0eeacaf191c@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="3760"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 28 16:04:01 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 1jID0C-0000tp-Rk for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Mar 2020 16:04:00 +0100 Original-Received: from localhost ([::1]:53840 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jID0B-0000FZ-UJ for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Mar 2020 11:03:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37354) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jICzV-0007uV-7t for emacs-devel@gnu.org; Sat, 28 Mar 2020 11:03:18 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35111) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jICzV-00089T-3w; Sat, 28 Mar 2020 11:03:17 -0400 Original-Received: from [176.228.60.248] (port=2665 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jICzU-0001GB-BY; Sat, 28 Mar 2020 11:03:16 -0400 In-Reply-To: <7ee94ed4-7a11-90bd-df69-c0eeacaf191c@gmail.com> (message from =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel on Sat, 28 Mar 2020 10:43:00 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:245879 Archived-At: > From: Clément Pit-Claudel > Date: Sat, 28 Mar 2020 10:43:00 -0400 > > On 28/03/2020 05.58, Eli Zaretskii wrote: > > I think the way to increase performance of C/C++ fontification, > > indentation, etc. is to use syntactic analysis in C (or another > > similarly fast compiled language). Several programs/libraries are > > available out there for this purpose, and we should encourage > > interested individuals to work on making these used by our major modes > > that support programming languages. The time we could do that with > > ad-hoc regexps and the likes of syntax-ppss has gone, IMO. > > I've looked, but I don't really know of any such libraries. What about tree-sitter? > The problem that cc-mode has to solve most of the time is fontifying an invalid C program (since, unless the programmer is using a structural editing mode), code that is being typed is invalid most of the time. Most language parsing facilities out there do not have great error recovery, so they are not very good at giving semantic annotations useful for syntax highlighting broken code. AFAIK, tree-sitter's use cases include the above.