[climacs-devel] Can syntax classes handle text overlays? (Evaluating from buffer)

Christophe Rhodes csr21 at cam.ac.uk
Thu Aug 25 18:48:35 UTC 2005


Robert Strandh <strandh at labri.fr> writes:

> Hello, 
>
> Derek Peschel writes:
>  > On Thu, Aug 25, 2005 at 06:34:46AM +0200, Robert Strandh wrote:
>  > > Sort of.  It gets called for every parse tree that is at least
>  > > partially on display in a window. 
>  > 
>  > Does the caller of display-parse-tree keep track of what's on display,
>  > say by tracking the parse item in the upper left corner of the window?
>
> No, there is an :around method that checks whether part of the parse
> tree is on display, if so, it does (call-next-method).  We guarantee
> that the leaf parse trees (lexemes) do not span newlines, so no need
> to take care of partially-displayed lexemes.

Just to add to that -- that's only sometimes true.  Prolog syntax, for
instance, allows lexemes to have embedded newlines; its
DISPLAY-PARSE-TREE method for prolog tokens is consequently more
complicated.  (The newlines in the lexer are at least partly motivated
by making the Prolog syntax implementation very close to the ISO
specification document, but I believe that not doing so adds much
extra complexity to the parsing stage in Prolog's case).

Cheers,

Christophe



More information about the climacs-devel mailing list