[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dynamic loading progress
From: |
Stephen Leake |
Subject: |
Re: Dynamic loading progress |
Date: |
Sat, 14 Feb 2015 09:32:54 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) |
Eli Zaretskii <address@hidden> writes:
>> From: Stephen Leake <address@hidden>
>> 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
- Re: Dynamic loading progress, (continued)
- Re: Dynamic loading progress, Stephen J. Turnbull, 2015/02/14
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/14
- Re: Dynamic loading progress, Stephen J. Turnbull, 2015/02/15
- Re: Dynamic loading progress, Steinar Bang, 2015/02/15
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/15
- Re: Dynamic loading progress, Stefan Monnier, 2015/02/15
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/15
- Re: Dynamic loading progress, Stefan Monnier, 2015/02/15
- Re: Dynamic loading progress,
Stephen Leake <=
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/14
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/14
- Re: Dynamic loading progress, Stephen Leake, 2015/02/14
- Re: Dynamic loading progress, Daniel Colascione, 2015/02/15
- Re: Dynamic loading progress, Stephen Leake, 2015/02/15
- Re: Dynamic loading progress, Stefan Monnier, 2015/02/15
- Re: Dynamic loading progress, Eli Zaretskii, 2015/02/15
- Re: Dynamic loading progress, Stephen J. Turnbull, 2015/02/15
- Re: Dynamic loading progress, Aurélien Aptel, 2015/02/16
- Re: Dynamic loading progress, joakim, 2015/02/15