Neil wrote:
>    The RESearch.cxx implementation uses a static (and hence global)
> table for this job. A patch that allows word characters to vary should
> move the table to a member of RESearch class so that it will not
> affect other instances of Scintilla, each of which may use a different
> set of word characters.
The simplest implementation is:
1)  Change ModifyWord(char*s) which is currently unused, to be:
    s == NULL, reset the list
    else set list from s.
2)  Change RESearch constructor to RESearch(char *s = NULL) to set the list
3)  Document: pass in string based on charClass to RESearch and also call
    ModifyWord() whenever the classification changes.

A possibly better thing to do would be:
1)  Move definition of charClassification into RESearch
2)  Change RESearch constructor to accept pointer to charClassification

The second idea stops RESearch being so independent, but it stops storing 
information twice, and allows for future RE items, such as \w for white space 
or ways of detecting punctuation. It also saves us the bother for building the 
word string from charClass.

Which would you prefer? Or do you have a better solution?

Greg



_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to