[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using incremental parsing in Emacs (via: emacs rendering comparisson

From: Stephen Leake
Subject: Re: Using incremental parsing in Emacs (via: emacs rendering comparisson between emacs23 and emacs26.3)
Date: Tue, 31 Mar 2020 16:39:18 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (windows-nt)

Stefan Monnier <address@hidden> writes:

>>> > What is "OS-and-architecture-neutral representation of the grammar" and 
>>> > how
>>> > it is different from what tree-sitter uses now?
>>> I don't know, that's part of the question (well, I know what I mean by
>>> an "OS-and-architecture-neutral representation", of course,
>>> but I believe you also understand this concept).
>> Actually, no, I don't.  It was a serious question, I didn't understand
>> what grammar representation you had in mind.
> I don't have any in mind.  It just needs to be
> OS-and-architecture-neutral (otherwise it requires either distribution
> of pre-compiled versions (with the logistical problem of covering all
> possible OSes and architectures), or it requires a compiler on the
> end-user machine).

At one extreme, the source code for the grammar is
OS-and-architecture-neutral. Tree-sitter compiles the source code to
binary (presumably in a linkable library). There may be some
intermediate representation of the grammar that would be useful in some
way, but I don't see how.

Normally, wisi compiles the grammar source to Ada code, then compiles
that to an executable, wisi also provides a "text_rep" representation of
the LR parse table (almost-readable ASCII text), but that's an
implementation detail; the Ada compiler can't handle very large tables
when represented as compilable Ada source.

semantic compiles a grammar to elisp source, then byte-compiles that.

-- Stephe

reply via email to

[Prev in Thread] Current Thread [Next in Thread]