~haaaad/geany/master

« back to all changes in this revision

Viewing changes to scintilla/src/RESearch.h

  • Committer: elextr
  • Author(s): Colomban Wendling
  • Date: 2017-07-24 23:24:05 UTC
  • Revision ID: git-v1:18360460abb4f4bec23dff127031ecf4e9120f7f
Update Scintilla to version 3.7.5 (#1503)

* Update Scintilla to version 3.7.5

This now requires a C++11-capable compiler.

Closes #1308.

* Test using newer dist on Travis

Since Scintilla needs C++11

* Add debugging code for when configure fails

* Workaround a pkg-config-corsswrapper bug on Ubuntu 14.04

See https://bugs.launchpad.net/ubuntu/+source/mingw-w64/+bug/1327242

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
class CharacterIndexer {
25
25
public:
26
 
        virtual char CharAt(int index)=0;
 
26
        virtual char CharAt(Sci::Position index)=0;
27
27
        virtual ~CharacterIndexer() {
28
28
        }
29
29
};
32
32
 
33
33
public:
34
34
        explicit RESearch(CharClassify *charClassTable);
 
35
        // No dynamic allocation so default copy constructor and assignment operator are OK.
35
36
        ~RESearch();
36
37
        void Clear();
37
38
        void GrabMatches(CharacterIndexer &ci);
38
 
        const char *Compile(const char *pattern, int length, bool caseSensitive, bool posix);
39
 
        int Execute(CharacterIndexer &ci, int lp, int endp);
 
39
        const char *Compile(const char *pattern, Sci::Position length, bool caseSensitive, bool posix);
 
40
        int Execute(CharacterIndexer &ci, Sci::Position lp, Sci::Position endp);
40
41
 
41
42
        enum { MAXTAG=10 };
42
43
        enum { MAXNFA=4096 };
43
44
        enum { NOTFOUND=-1 };
44
45
 
45
 
        int bopat[MAXTAG];
46
 
        int eopat[MAXTAG];
 
46
        Sci::Position bopat[MAXTAG];
 
47
        Sci::Position eopat[MAXTAG];
47
48
        std::string pat[MAXTAG];
48
49
 
49
50
private:
51
52
        void ChSetWithCase(unsigned char c, bool caseSensitive);
52
53
        int GetBackslashExpression(const char *pattern, int &incr);
53
54
 
54
 
        int PMatch(CharacterIndexer &ci, int lp, int endp, char *ap);
 
55
        Sci::Position PMatch(CharacterIndexer &ci, Sci::Position lp, Sci::Position endp, char *ap);
55
56
 
56
 
        int bol;
57
 
        int tagstk[MAXTAG];  /* subpat tag stack */
 
57
        Sci::Position bol;
 
58
        Sci::Position tagstk[MAXTAG];  /* subpat tag stack */
58
59
        char nfa[MAXNFA];    /* automaton */
59
60
        int sta;
60
61
        unsigned char bittab[BITBLK]; /* bit table for CCL pre-set bits */