[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Re: cc-mode fontification feels random
From: |
Alan Mackenzie |
Subject: |
Re: [PATCH] Re: cc-mode fontification feels random |
Date: |
Mon, 30 Aug 2021 19:18:17 +0000 |
Hello, Perry.
On Mon, Aug 30, 2021 at 15:03:43 -0400, Perry E. Metzger wrote:
> 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...
Yes. At some time in the future it will work, presumably well.
> >> 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.
I'm not aiming at perfection. It's a fairly simple hack whose aim is to
reduce the level of Daniel's (and others') irritation. I think there's
now a general understanding that parsing the language is needed for
accurate fontification (and indentation). But that is some way off,
yet.
> Perry
--
Alan Mackenzie (Nuremberg, Germany).
- [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Perry E. Metzger, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random,
Alan Mackenzie <=
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Daniel Colascione, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Stefan Monnier, 2021/08/30
- Re: [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Alan Mackenzie, 2021/08/31
- Re: [PATCH] Re: cc-mode fontification feels random, Eli Zaretskii, 2021/08/31