vile
[Top][All Lists]
Advanced

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

Re: [vile] Spooky action in hs-filt.l


From: Thomas Dickey
Subject: Re: [vile] Spooky action in hs-filt.l
Date: Fri, 1 May 2009 15:55:43 -0400 (EDT)

On Fri, 1 May 2009, Brendan MacDonell wrote:

Normally with a little bit of grepping around, I'm able to figure out
what exactly is going on in the syntax highlighters, but the Haskell
filter frankly has me stumped. Not only do keywords not appear to be
loaded when it is compiled as a builtin (at least, no keywords seem to
be found in either table, with or without modifications to modes.rc,
filters.rc, or hs.keywords), but using it (again as a builtin) also
appears to be none-deterministic as to the state when comments are
handled - some comments are highlighted, while others are not
depending on the order in which they are entered into the editor.

That's about the point where I'd construct a stripped-down .vilerc
with only the scripting I needed to reproduce the problem, and
then rebuild vile with

        --with-builtin-filters
        --with-trace
        --with-valgrind

and see if valgrind could tell me about some invisible memory corruption.

Curious as to the cause, I tried to bisect between version 9.7e and
9.7p in my local git repository, only to discover that patch e seems
to be functionally equivalent. The strangest thing is that compiling
hs-filt.l as an external filter and running it manually seems to yield
the correct results, whether with or without -vv, and piping the
output through atr2ansi yields the expected keyword-highlighted
outcome. Frankly I'm at a loss to explain exactly why this is, much
less to begin debugging it, so I'd be interested to know if anyone
else has this problem (maybe it's a corner case of my
flex|reflex/compiler/arch/etc. combo?), or if anyone can explain
what's going on with it to me.

It could be a problem outside the filter - though at the moment the only issue _I_ have found appears in the spell-filter on windows (and I was just setting off to see if I could trap it).

Bear in mind that the builtin-filter interface differs subtly from
the extern-filter interface.  Usually it's the same...

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

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