[pedevel] Re: keywords.cpp with BeOS API symbols

  • From: Christian Packmann <Christian.Packmann@xxxxxx>
  • To: pedevel@xxxxxxxxxxxxx
  • Date: Sun, 02 May 2004 15:16:06 +0000

On 2004-05-02 00:55:33 [+0000], Axel D=F6rfler wrote:

> Correct parsing could have a lot of advantages, like pointing out=20
> (spelling) errors in the code :-)
> Most modern IDEs have such a feature anyway.

Correct parsing sure would be nice, but as Oliver pointed out, we'd need=20
namespace parsing for C++, and that would be decidedly non-trivial.
AFAICS truly correct context-sensitive parsing would require not only a=20
good parser, but a complete and tightly integrated IDE. The IDE has to keep=
=20
track of all classes/methods, not only BeOS ones, but also the ones in the=
=20
current project (like e.g. Delphi/Kylix does). IMO this is beyond the scope=
=20
of a "simple" editor like Pe.

But even the simple parser currently in place will help eliminate spelling=
=20
errors, at least those of the predefined classes/functions; I already use a=
=20
pretty extensive BeOS API keyword set with Pe, and it's nice to see by=20
syntax coloring if ones memory of a B_* constant was right without the need=
=20
of letting the compiler test it.

Of course we'll have to live with the problem of incorrect coloring when a=
=20
name from the BeOS API is used in another context; the simple parser will=20
probably simply color it as BeOS type/method. But I don't think this will=20
be too much of a problem, as syntax-coloring can still be turned off, or be=
=20
used with a customized keyword set.

Bye,
Chris

Other related posts: