Re: Syntax Highlighting Text Widgets

On Wed, 01 Mar 2000 20:45:30 Matthew wrote:


> >We need some kind of lexical analysis of the text to do highlighting.
> >Earlier versions of gtkeditor used the regex library from emacs to
> >translate regexps into scanners.  With this approach you need to link
> >in this library, but you get rid of creating dynamic libraries and
> >loading these.  With the current approach we use flex.  Here we get
> >rid of the regex library, but we need to handle dynamic libraries.

> I understand.  That's where my problem lies.  I have to support this 
> on several platforms, and having to troubleshoot flex and dynamic libraries 
> Solaris or HPUX is not a job that I'm up to.  :)

I'm personally running the editor on linux, solaris, and irix, so I'll 
try to keep the editor working on those.  I have access to hpux 
machines, but I need to install gtk on them before I can do any testing 
there.  Anyway, what I'm trying to say here is that we'll do our best to 
work cross-platform.  I guess most of our development is done on linux, 
so our CVS might not work on all platforms, but we'll try to keep our 
releases cross-platform.

That being said, of course things can (and will) go wrong, so I 
understand your reluctance to use this way of configuring the editor.


> I guess under my rather restrictive conditions coding one by hand is the 
> sure-fire way to guarentee that it would work everywhere.  And since my 
> language isn't mainstream, the chances of pilfering one from another project
> are slim.  I'll see what I can do with the autogenerated c-scanner.c.

I think you want to change c-scanner.flex rather than c-scanner.c, and 
then use flex to generate c-scanner.c.  c-scanner.c is not a particular 
readable file.  It would be easier still to use 
'gtk_editor_compile_scanner' with some appropriate parameters, and then 
use the result of that as your basis.  Otherwise you could try getting 
the regex library from emacs.  This will run on any platform (any that I 
am aware of at least).

If you run into any problems with this feel free to mail.


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