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: Dynamic loading progress Date: Sat, 14 Feb 2015 09:32:54 -0600 Message-ID: <857fvkik49.fsf@stephe-leake.org> References: <83y4oiiw81.fsf@gnu.org> <838ugdf251.fsf@gnu.org> <54D80098.3020209@cs.ucla.edu> <54D85304.1030600@cs.ucla.edu> <54D9AC29.2020603@cs.ucla.edu> <54DA8539.1020905@cs.ucla.edu> <87zj8ktq8f.fsf@lifelogs.com> <54DD6413.1000403@cs.ucla.edu> <83wq3m436s.fsf@gnu.org> <54DDEB4D.5040300@dancol> <83egpt4zz6.fsf@gnu.org> <54DE12E9.5040606@dancol.org> <85twypiiug.fsf@stephe-leake.org> <83zj8g3n16.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1423928018 9847 80.91.229.3 (14 Feb 2015 15:33:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 14 Feb 2015 15:33:38 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 14 16:33:27 2015 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 1YMeij-0000R7-Dw for ged-emacs-devel@m.gmane.org; Sat, 14 Feb 2015 16:33:25 +0100 Original-Received: from localhost ([::1]:60161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMeii-0004OL-M5 for ged-emacs-devel@m.gmane.org; Sat, 14 Feb 2015 10:33:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMeif-0004OF-4a for emacs-devel@gnu.org; Sat, 14 Feb 2015 10:33:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMeiZ-0000f2-Ng for emacs-devel@gnu.org; Sat, 14 Feb 2015 10:33:21 -0500 Original-Received: from gproxy7-pub.mail.unifiedlayer.com ([70.40.196.235]:38033) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1YMeiZ-0000em-HZ for emacs-devel@gnu.org; Sat, 14 Feb 2015 10:33:15 -0500 Original-Received: (qmail 10025 invoked by uid 0); 14 Feb 2015 15:33:07 -0000 Original-Received: from unknown (HELO cmgw2) (10.0.90.83) by gproxy7.mail.unifiedlayer.com with SMTP; 14 Feb 2015 15:33:07 -0000 Original-Received: from host114.hostmonster.com ([74.220.207.114]) by cmgw2 with id sFZ21p00H2UdiVW01FZ5vz; Sat, 14 Feb 2015 08:33:07 -0700 X-Authority-Analysis: v=2.1 cv=NPZGpSKg c=1 sm=1 tr=0 a=CQdxDb2CKd3SRg4I0/XZPQ==:117 a=CQdxDb2CKd3SRg4I0/XZPQ==:17 a=DsvgjBjRAAAA:8 a=f5113yIGAAAA:8 a=TeMFXEv2S7AA:10 a=9i_RQKNPAAAA:8 a=hEr_IkYJT6EA:10 a=jrwKn-8xaegA:10 a=0HtSIViG9nkA:10 a=mDV3o1hIAAAA:8 a=236lFpryMX00ON3fRicA:9 Original-Received: from [70.94.38.149] (port=51137 helo=takver) by host114.hostmonster.com with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.82) (envelope-from ) id 1YMeiM-0004Ch-2r for emacs-devel@gnu.org; Sat, 14 Feb 2015 08:33:02 -0700 In-Reply-To: <83zj8g3n16.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 14 Feb 2015 10:39:01 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) X-Identified-User: {2442:host114.hostmonster.com:stephele:stephe-leake.org} {sentby:smtp auth 70.94.38.149 authed with stephen_leake@stephe-leake.org} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 70.40.196.235 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:183062 Archived-At: Eli Zaretskii writes: >> From: Stephen Leake >> Date: Fri, 13 Feb 2015 15:48:07 -0600 >> >> My use case requires calling lisp functions; in particular, >> put-text-property, but also other higher-level lisp functions in >> ada-mode. > > Why do you need to call Lisp in the module? I think it's a no-no for > modules to call Lisp; that should be done in the Lisp code that uses > the module. > >> I need a compiled module to implement an LALR parser for the Ada >> language that is fast enough for very large files. > > Why does an implementation of a parser need to call Lisp? Emacs ada-mode does indentation in two steps; first it parses the source code, and the parser actions are lisp functions that eventually call put-text-property to store information about the syntax and/or semantics on many identifiers. Then the indentation code uses those text properties to compute indentation. I have a generalized LALR parser implemented in elisp that is fast enough for many user's Ada files, but some users have much bigger files, and it takes them 10 seconds to parse. So I need a faster implementation. So far my benchmarking says I can get close with a machine compiled parser. So the module would contain the generalized LALR parser; the actions of the parser would still be calls to the lisp functions. Of course, lisp put-text-property is implemented in C, so I could reimplement the parser actions in the module, and call that C function directly. But it would be convenient to be able to call the higher-level lisp parser action functions from the module; that would simplify maintaining the module and elisp parser implementations in parallel. -- -- Stephe