beaver-devel
[Top][All Lists]
Advanced

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

Re: [Beaver-devel] New sy/hi with pcre; a second preview


From: Leslie Polzer
Subject: Re: [Beaver-devel] New sy/hi with pcre; a second preview
Date: Mon, 7 Apr 2003 20:53:48 +0200

On Mon, 07 Apr 2003 13:33:33 -0400
Michael Terry <address@hidden> wrote:

> Disclaimer: I haven't really spent some time looking at the code.  I 
> will try to later.  But here are some initial comments.
That's alright; I guessed you are quite busy at the moment.

> Leslie Polzer wrote:
> > NB: colors in syntax files are in range 0-255 instead of GdkColor 0-65535.
> 
> Any particular reason?
Not really. I thought Gdk used this range and I'm personally used to it.
When I realized it was different I said to myself that we don't need such a
fine-grained range anyway and left it that way. We may change that of course.

> > I'd especially appreciate feedback regarding the syntax file format and
> > the method I use to read the syntax files (fscanf()).
> 
> One suggestion I have is to use the glib-provided |g_file_get_contents|,
You're a walking G* reference.

> which does nice error checking and gives you a big allocated buffer of 
> the file.  I would imagine that parsing a string buffer would be less 
> error-prone that doing it all on the file as it comes in.
Why?

> As for the file format, it is hard to read human-wise (mostly because of 
> the lack of spaces and regexp syntax).
I placed spaces where I could ;)
And that's the disadvantage of regular expressions. Well, maybe we
can relax it a bit with special operators. I'll have to look that
up in the perlre reference.

> I doubt it's very important. 
> But, we should at least decide whether it is or not -- i.e. who our 
> target audience is with respect to editing syntax files.  If it's just 
> us, it can be as obtuse as we want.  :)
>
> I vote that we only worry about us editing these -- I can't imagine a 
> whole community developing around our syntax files.
Agreed; and whoever needs to create a special file should either
learn regex or use the ultraedit wordfile stuff.

The rest of the _initial_ highlighting stuff is quite a snap
- however, I am worrying about the kind of dynamic update strategy
we should pursue. Maybe we can discuss that in a separate thread.


Leslie




reply via email to

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