~ubuntu-branches/ubuntu/raring/codeblocks/raring-proposed

« back to all changes in this revision

Viewing changes to src/sdk/wxscintilla/src/scintilla/src/RESearch.h

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-08-09 04:38:38 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100809043838-a59ygguym4eg0jgw
Tags: 10.05-0ubuntu1
* New upstream release. Closes (LP: #322350)
 - Switch to dpkg-source 3.0 (quilt) format
 - Remove unneeded README.source
 - Add debian/get-source-orig script that removes all
   Windows prebuilt binaries
* Bump Standards-Version to 3.9.1
 - Stop shipping *.la files
* debian/control
 - Add cdbs package as Build-Depend
 - Add libbz2-dev and zlib1g-dev packages as
   Build-Depends (needed by libhelp_plugin.so)
 - Remove dpatch package of Build-Depends
 - Add codeblocks-contrib-debug package
 - Split architecture-independent files of codeblocks
   package in codeblocks-common package
* debian/rules
 - Switch to CDBS rules system
 - Add parallel build support
 - Add a call to debian/get-source-orig script
 - Use lzma compression (saves 23,5 MB of free space)
* debian/patches
 - Refresh 01_codeblocks_plugin_path
 - Add 02_no_Makefiles_in_debian_dir to remove any link
   in codeblocks build system to deleted Makefiles of debian directory
 - Drop 02_ftbfs_gcc44 and 03_ftbfs_glib221 (merged in upstream)
* debian/watch
 - Update to use the new host (berlios.de)

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#ifndef RESEARCH_H
10
10
#define RESEARCH_H
11
11
 
 
12
#ifdef SCI_NAMESPACE
 
13
namespace Scintilla {
 
14
#endif
 
15
 
12
16
/*
13
17
 * The following defines are not meant to be changeable.
14
18
 * They are for readability only.
18
22
#define BITBLK  MAXCHR/CHRBIT
19
23
 
20
24
class CharacterIndexer {
21
 
public: 
 
25
public:
22
26
        virtual char CharAt(int index)=0;
23
27
        virtual ~CharacterIndexer() {
24
28
        }
27
31
class RESearch {
28
32
 
29
33
public:
30
 
        RESearch();
 
34
        RESearch(CharClassify *charClassTable);
31
35
        ~RESearch();
32
 
        void Init();
33
 
        void Clear();
34
36
        bool GrabMatches(CharacterIndexer &ci);
35
 
        void ChSet(char c);
36
 
        void ChSetWithCase(char c, bool caseSensitive);
37
 
        const char *Compile(const char *pat, int length, bool caseSensitive, bool posix);
 
37
        const char *Compile(const char *pattern, int length, bool caseSensitive, bool posix);
38
38
        int Execute(CharacterIndexer &ci, int lp, int endp);
39
 
        void ModifyWord(char *s);
40
39
        int Substitute(CharacterIndexer &ci, char *src, char *dst);
41
40
 
42
 
        enum {MAXTAG=10};
43
 
        enum {MAXNFA=2048};
44
 
        enum {NOTFOUND=-1};
 
41
        enum { MAXTAG=10 };
 
42
        enum { MAXNFA=2048 };
 
43
        enum { NOTFOUND=-1 };
45
44
 
46
45
        int bopat[MAXTAG];
47
46
        int eopat[MAXTAG];
48
47
        char *pat[MAXTAG];
49
48
 
50
49
private:
 
50
        void Init();
 
51
        void Clear();
 
52
        void ChSet(unsigned char c);
 
53
        void ChSetWithCase(unsigned char c, bool caseSensitive);
 
54
        int GetBackslashExpression(const char *pattern, int &incr);
 
55
 
51
56
        int PMatch(CharacterIndexer &ci, int lp, int endp, char *ap);
52
57
 
53
58
        int bol;
54
 
        int  tagstk[MAXTAG];             /* subpat tag stack..*/
55
 
        char nfa[MAXNFA];               /* automaton..       */
 
59
        int tagstk[MAXTAG];  /* subpat tag stack */
 
60
        char nfa[MAXNFA];    /* automaton */
56
61
        int sta;
57
 
        char bittab[BITBLK];            /* bit table for CCL */
58
 
                                                /* pre-set bits...   */
 
62
        unsigned char bittab[BITBLK]; /* bit table for CCL pre-set bits */
59
63
        int failure;
 
64
        CharClassify *charClass;
 
65
        bool iswordc(unsigned char x) {
 
66
                return charClass->IsWord(x);
 
67
        }
60
68
};
61
69
 
62
 
#endif
 
70
#ifdef SCI_NAMESPACE
 
71
}
 
72
#endif
 
73
 
 
74
#endif
 
75