From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: parsing (was tokenizing) Date: Sun, 21 Sep 2014 10:13:53 -0500 Message-ID: <85lhpddn0u.fsf_-_@stephe-leake.org> References: <85a95ufeec.fsf@stephe-leake.org> <541DE083.4010000@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411312555 29882 80.91.229.3 (21 Sep 2014 15:15:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Sep 2014 15:15:55 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 21 17:15:47 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XVirS-0002H6-Q8 for ged-emacs-devel@m.gmane.org; Sun, 21 Sep 2014 17:15:38 +0200 Original-Received: from localhost ([::1]:39816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVirS-0003dS-CS for ged-emacs-devel@m.gmane.org; Sun, 21 Sep 2014 11:15:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XVir1-0003dB-3z for emacs-devel@gnu.org; Sun, 21 Sep 2014 11:15:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XViqt-0003Zu-L8 for emacs-devel@gnu.org; Sun, 21 Sep 2014 11:15:11 -0400 Original-Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.231]:11972 helo=dnvrco-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XViqt-0003RV-Gz for emacs-devel@gnu.org; Sun, 21 Sep 2014 11:15:03 -0400 Original-Received: from [70.94.38.149] ([70.94.38.149:58862] helo=TAKVER) by dnvrco-oedge03 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 56/F9-06155-33BEE145; Sun, 21 Sep 2014 15:13:57 +0000 In-Reply-To: <541DE083.4010000@gmail.com> (Eric Ludlam's message of "Sat, 20 Sep 2014 16:16:03 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) X-RR-Connecting-IP: 107.14.64.142:25 X-Authority-Analysis: v=2.1 cv=FMWVxoYs c=1 sm=1 tr=0 a=AppmJ/7ZOOFWL/q6u6u93g==:117 a=AppmJ/7ZOOFWL/q6u6u93g==:17 a=ayC55rCoAAAA:8 a=9XSUBuVRJI8A:10 a=_C5noPCBmhMA:10 a=oxIGwVI_pTUA:10 a=o_R75loqY_IA:10 a=9i_RQKNPAAAA:8 a=pGLkceISAAAA:8 a=O4BFijwPuB4IoDOgZw8A:9 a=MSl-tDqOz04A:10 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: BaiduSpider X-Received-From: 107.14.73.231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:174607 Archived-At: Eric Ludlam writes: > On 09/20/2014 12:40 PM, Vladimir Kazanov wrote: >>> Tokenizing the whole buffer after any change is easily fast enough (on >>> modern hardware), even on a 7000 line buffer. Semantic parsing gets a >>> lot slower. >>> >> This is what I do right now in my prototype of a smarter Python mode. >> The tokenizing process itself is usually fast enough. But parsing is >> more complicated, and may take some time to rebuild the parse tree. >> Incremental approach is a natural step here. >> > > I caught only the tail of this thread, so I apologize if I refer to > the incorrect thing. > > A year ago or so we were talking about ada-mode, a modified parser, > and how it might integrate with CEDET/Semantic on the CEDET mailing > list. Is it still 'wisi', a different flavor of 'wisent' ? Yes. > If calls into your parser are being handled by parts of CEDET/Semantic > for creating tags, then there is an incremental parser that you can > enable that works with two of the other parser types included. No, I'm not using the CEDET front end UI. Partly because that incremental parser does not handle the Ada language (or I did not want to put in the effort to modify my grammar to make it work). The wisi parser is generalized LALR, and it does not lend itself to incremental parsing. I also didn't need the full flexibility of the Semantic lexer; the wisi lexer relies solely on the elisp syntax properties, and is faster. On the other hand, the wisi parser is unacceptably slow for 7000 line Ada files (and I have customers complaining about files 10 times that size (or they are using really slow machines)), so I'm looking into ways to use compiled Ada code instead of elisp to run the parser. > I'll be happy to help > you figure out how to make your parser work in that framework. Once I get the speed acceptable, I intend to look again at the CEDET UI, and try to use as much as possible with Ada mode. In particular, smart completion would be a nice feature. -- -- Stephe