[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Aug 5 08:52:25 2003 
Subject:Re: poplog interactive mode - PS 
From:Chris Dollin 
Volume-ID:1030805.05 

A.Sloman@cs.bham.ac.uk wrote:

> On Mon, 4 Aug 2003, Jonathan L Cunningham wrote:
 
> One problem with the very notion of syntax colouring in pop11 is that
> it's a language with no syntax.

Teach the colouring engine the current syntax. It's going to be
rule-driven anyway, right? [For some notion of "rule".]

> To be more precise: the use of macros and syntax words allow almost any
> syntax to be accepted by the compiler (including, of course, the syntax
> of objectclass, or common lisp, of prolog, of PML, and, modestly,
> poprulebase). It's even more extendable than Common Lisp, which only has
> macros.

The colouring engine might provide a useful brake on such features ...

> But I accept that something like syntax colouring could be useful
> for novices.

It's not clear to me. I mean, I've been using Eclipse for Java
coding extensively in the past year. Uncoloured files now look ...
flat ... to me. And I'm an avowed "we don't need no steenkin' colours"
person.

> Here is a trivial way to do it which will work just as well for
> colour-blind people as for those with normal sight, and just as well no
> inverse video as normal video:
> 
> (a) define upper-case synonyms for all the main syntax words, e.g.
> IF THEN ELSE DEFINE UNLESS FOR BY FROM etc. and all the closing
> brackets.

Sorry, Aaron, but for me this solution is nowehere near an acceptable
substitute.
> 
> It's impossible to tell if you are in a string expression without going
> all the way back to the beginning of the file!

This kind of thing turns up in other languages too (eg with long comments);
if you need to go all the way back, you need to go all the way back.
Caching and heuristics help.

> Maybe the number of unescaped preceding string quotes associated with a
> line of the buffer could be cached. It would have to be recomputed
> whenever an un-escaped string quote is inserted or deleted.

Exactly.

But the two things I want from Ved/Poplog are

(1) Java support

(2) Refactoring support

Syntax colouring comes a long way after. (Of course it's *easier*. It's
just less useful.)

-- 
Chris "electric hedgehog" Dollin
C FAQs at: http://www.faqs.org/faqs/by-newsgroup/comp/comp.lang.c.html
C welcome: http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html