A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00951.html below:

Re: Tree sitter support for C-like languages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Stefan Monnier Subject: Re: Tree sitter support for C-like languages Date: Tue, 15 Nov 2022 11:01:24 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
> I guess we need to report these to the developers of the Tree-sitter's
> C parser?  Is there anything else we could do until they fix
> the parser?

AFAIK the tree-sitter parser parses basically already-preprocessed C.
It's wickedly hard to parse meaningfully notyet-preprocessed C with
something based on a BNF grammar.
So my guess is that this is going to be a "wont fix".

There might be a way to handle it (basically by using the CPP
definitions to extend the BNF grammar on the fly), but it seems
difficult to include it into a parser based on compiling the BNF to
a state machine :-(


        Stefan




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4