emacs-devel
[Top][All Lists]
Advanced

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

Re: [SPAM UNSURE] Re: Tree-sitter introduction documentation


From: Stephen Leake
Subject: Re: [SPAM UNSURE] Re: Tree-sitter introduction documentation
Date: Thu, 29 Dec 2022 13:50:50 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Lynn Winebarger <owinebar@gmail.com> writes:

> On Thu, Dec 29, 2022 at 10:28 AM Gregory Heytings <gregory@heytings.org> 
> wrote:
>> > Do you know how strong the dependency on node is?  As I said before, it
>> > seems that it is possible to evaluate the grammar files that use the DSL
>> > using something like quickjs as well
>> >
>>
>> That's not possible, no, at least not without a lot of complications that
>> do not seem worth the price, compared to installing Node.js.  And note
>> that even if that were feasible, it would only solve the first half of the
>> problem: to transform a grammar.js file into its corresponding parser.c
>> file, you also need the tree-sitter command line program.
>
> Maybe a better question is - is it possible to adapt the semantic
> parser generators (or others in emacs) to create the ".c" files for
> use with libtreesitter?

This is possible in principle; I've thought about doing it with the
wisitoken parser generator.

However, the format/struture/details of the output is not documented,
and may change in future tree-sitter releases.

> The functionality of libtreesitter is probably useful independent of
> the tool used to create the module it loads, as long as it satisfies
> the functional requirements. Would the treesitter authors be amenable
> to establishing a documented ABI for that component so other
> parser-generators could target it?

That's worth filing an issue on the tree-sitter development site. I
looked briefly, and did not see a similar issue.

-- 
-- Stephe



reply via email to

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