From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Perry Smith Newsgroups: gmane.emacs.help Subject: Re: State-machine based syntax highlighting Date: Thu, 7 Dec 2006 14:24:25 -0600 Message-ID: <2FCD3A38-5454-4F04-B4F3-E3E3AFC65F81@easesoftware.com> References: <1165472049.496117.320630@79g2000cws.googlegroups.com> <1165488825.132862.189340@79g2000cws.googlegroups.com> <1165492567.864982.59980@79g2000cws.googlegroups.com> <1165495364.560960.271250@f1g2000cwa.googlegroups.com> <1165501630.172348.157180@j72g2000cwa.googlegroups.com> <1165502373.932709.15860@79g2000cws.googlegroups.com> <1165510932.276718.251220@73g2000cwn.googlegroups.com> <1165516558.657188.21610@j44g2000cwa.googlegroups.com> <1165517838.526624.171950@f1g2000cwa.googlegroups.com> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/mixed; boundary="===============1821759081==" X-Trace: sea.gmane.org 1165523144 1967 80.91.229.10 (7 Dec 2006 20:25:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Dec 2006 20:25:44 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 07 21:25:41 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GsPoK-0006e5-G0 for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Dec 2006 21:25:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsPoJ-00059Y-Uk for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Dec 2006 15:25:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GsPnn-00050P-Ab for help-gnu-emacs@gnu.org; Thu, 07 Dec 2006 15:25:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GsPnj-0004v6-3o for help-gnu-emacs@gnu.org; Thu, 07 Dec 2006 15:25:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GsPni-0004uc-Lk for help-gnu-emacs@gnu.org; Thu, 07 Dec 2006 15:25:02 -0500 Original-Received: from [64.192.143.210] (helo=easeserver.easesoftware.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GsPni-0007uK-0v for help-gnu-emacs@gnu.org; Thu, 07 Dec 2006 15:25:02 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by easeserver.easesoftware.com (Postfix) with ESMTP id E76E458E68F; Thu, 7 Dec 2006 14:24:55 -0600 (CST) Original-Received: from easeserver.easesoftware.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29513-02; Thu, 7 Dec 2006 14:24:52 -0600 (CST) Original-Received: from [64.192.143.213] (small-fry.easesoftware.com [64.192.143.213]) by easeserver.easesoftware.com (Postfix) with ESMTP id E4B1B58E65C; Thu, 7 Dec 2006 14:24:51 -0600 (CST) In-Reply-To: <1165517838.526624.171950@f1g2000cwa.googlegroups.com> Original-To: Robert Thorpe X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new at easesoftware.net X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39337 Archived-At: --===============1821759081== Content-Type: multipart/alternative; boundary=Apple-Mail-9-384788367 --Apple-Mail-9-384788367 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On Dec 7, 2006, at 12:57 PM, Robert Thorpe wrote: > spamfilteraccount@gmail.com wrote: >> Stefan Monnier wrote: >>> >>> Actually, font-locking *is* implemented in C. The elisp part >>> usually takes >>> a negligible amount of time. The problem start appearing when the >>> functionality of the C code is not sufficient and you start >>> trying to parse >>> the code in elisp, which is slow. >> >> Good to know. I thought font-lock was implemented in elisp and didn't >> bother to check. > > Precisely speaking... > The code that determines what rules are used to font-lock text is in > Elisp. > The regexp engine that finds the things to be font-locked is in the > core of Emacs. > The colourisation is implemented in the Emacs core. Instead of a state machine, how about a lalr parser? It would be a fun project to take the lalr table generation logic from bison, smash it into emacs, along with some predefined actions and hooks back into emacs. The grammers could be loaded when needed. Perry Smith ( pedz@easesoftware.com ) Ease Software, Inc. ( http://www.easesoftware.com ) Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems --Apple-Mail-9-384788367 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1

= --Apple-Mail-9-384788367-- --===============1821759081== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ help-gnu-emacs mailing list help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============1821759081==--