[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C Mode: acceleration in brace deserts.
From: |
Alan Mackenzie |
Subject: |
Re: C Mode: acceleration in brace deserts. |
Date: |
Thu, 3 Dec 2009 16:59:37 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Lennart!
On Thu, Dec 03, 2009 at 05:26:57PM +0100, Lennart Borgman wrote:
> Hi Alan,
> Can you tell me how the cache [c-parse-state] is implemented so I can
> support it in MuMaMo?
Short brusque answer: no - it's ~1300 lines of code, much of it arcane.
Slightly longer answer: The cache's structure is a list of the positions
of each successively enclosing brace/bracket/paren from point going back
to the top level. Additionally, if there is a brace pair preceding such
a b/b/p, it is recorded as a cons. Also there is a "good position", a
position where the cache is known to be valid.
When c-state-cache is called from a new position, the cache is usually
updated rather than being calculated from scratch. The involves
removing entries from the cache which are now later than point, removing
other entries which aren't relevant, since they've been "closed off",
etc. - then scanning forward pairs of parens at a time successively
entering deeper levels (see `c-append-to-state-cache'). Lots of dirty
tricks are used to speed up the process as much as possible.
Sorry I can't be more help, here. But if you've any specific questions,
let me know.
> Best wishes,
> L
--
Alan Mackenzie (Nuremberg, Germany).
- C Mode: acceleration in brace deserts., Alan Mackenzie, 2009/12/03
- Re: C Mode: acceleration in brace deserts., Lennart Borgman, 2009/12/03
- Re: C Mode: acceleration in brace deserts.,
Alan Mackenzie <=
- Re: C Mode: acceleration in brace deserts., Lennart Borgman, 2009/12/03
- Re: C Mode: acceleration in brace deserts., Alan Mackenzie, 2009/12/03
- Re: C Mode: acceleration in brace deserts., Lennart Borgman, 2009/12/03
- Re: C Mode: acceleration in brace deserts., Lennart Borgman, 2009/12/04
- Re: C Mode: acceleration in brace deserts., Lennart Borgman, 2009/12/04
- Re: C Mode: acceleration in brace deserts., Alan Mackenzie, 2009/12/04
- Re: C Mode: acceleration in brace deserts., Lennart Borgman, 2009/12/04
- Re: C Mode: acceleration in brace deserts., Lennart Borgman, 2009/12/04
- Re: C Mode: acceleration in brace deserts., Alan Mackenzie, 2009/12/04
- Re: C Mode: acceleration in brace deserts., Lennart Borgman, 2009/12/04