emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Re: cc-mode fontification feels random


From: Perry E. Metzger
Subject: Re: [PATCH] Re: cc-mode fontification feels random
Date: Mon, 30 Aug 2021 15:03:43 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:92.0) Gecko/20100101 Thunderbird/92.0

On 8/30/21 14:50, Alan Mackenzie wrote:
For years and years now, I've been thinking we just need more
deterministic parser-and-based mode support, and I still think that, but
on a realistic level, that doesn't seem to be coming any time soon.

I note that Tree Sitter integration is in active development now...


In the meantime, is there any general approach we might be able to use
to get stuff like the attached to stop happening?
Here, "stuff like the attached" was having some types correctly
fontified, others not.  This was due to the order, somewhat random, in
which a type is recognised as such and entered into a CC Mode table, and
its use being scanned in a jit-lock chunk.

The following patch is an attempt to improve this situation.

I think we are inevitably hitting the wall here, because it is not possible to parse a context free grammar with regular expressions. One can only move around the suck, one can't actually remove it without parsing the underlying language.


Perry





reply via email to

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