~ubuntu-branches/ubuntu/natty/geany/natty

« back to all changes in this revision

Viewing changes to tagmanager/include/gnuregex.h

  • Committer: Bazaar Package Importer
  • Author(s): Chow Loong Jin
  • Date: 2010-08-07 03:23:12 UTC
  • mfrom: (1.4.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 22.
  • Revision ID: james.westby@ubuntu.com-20100807032312-ot70ac9d50cn79we
Tags: upstream-0.19
ImportĀ upstreamĀ versionĀ 0.19

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#define RE_BACKSLASH_ESCAPE_IN_LISTS (1)
43
43
 
44
44
/* If this bit is not set, then + and ? are operators, and \+ and \? are
45
 
     literals. 
 
45
     literals.
46
46
   If set, then \+ and \? are operators and + and ? are literals.  */
47
47
#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
48
48
 
58
58
        ^  is an anchor if it is at the beginning of a regular
59
59
           expression or after an open-group or an alternation operator;
60
60
        $  is an anchor if it is at the end of a regular expression, or
61
 
           before a close-group or an alternation operator.  
 
61
           before a close-group or an alternation operator.
62
62
 
63
63
   This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
64
64
   POSIX draft 11.2 says that * etc. in leading positions is undefined.
69
69
/* If this bit is set, then special characters are always special
70
70
     regardless of where they are in the pattern.
71
71
   If this bit is not set, then special characters are special only in
72
 
     some contexts; otherwise they are ordinary.  Specifically, 
 
72
     some contexts; otherwise they are ordinary.  Specifically,
73
73
     * + ? and intervals are only special when not after the beginning,
74
74
     open-group, or alternation operator.  */
75
75
#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
91
91
#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
92
92
 
93
93
/* If this bit is set, either \{...\} or {...} defines an
94
 
     interval, depending on RE_NO_BK_BRACES. 
 
94
     interval, depending on RE_NO_BK_BRACES.
95
95
   If not set, \{, \}, {, and } are literals.  */
96
96
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
97
97
 
116
116
   If not set, then \<digit> is a back-reference.  */
117
117
#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
118
118
 
119
 
/* If this bit is set, then | is an alternation operator, and \| is literal. 
 
119
/* If this bit is set, then | is an alternation operator, and \| is literal.
120
120
   If not set, then \| is an alternation operator, and | is literal.  */
121
121
#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
122
122
 
135
135
   stored in the pattern buffer, so changing this does not affect
136
136
   already-compiled regexps.  */
137
137
extern reg_syntax_t re_syntax_options;
138
 
 
 
138
 
139
139
/* Define combinations of the above bits for the standard possibilities.
140
140
   (The [[[ comments delimit what gets put into the Texinfo file, so
141
 
   don't delete them!)  */ 
 
141
   don't delete them!)  */
142
142
/* [[[begin syntaxes]]] */
143
143
#define RE_SYNTAX_EMACS 0
144
144
 
198
198
   | RE_NO_BK_PARENS        | RE_NO_BK_REFS                             \
199
199
   | RE_NO_BK_VBAR          | RE_UNMATCHED_RIGHT_PAREN_ORD)
200
200
/* [[[end syntaxes]]] */
201
 
 
 
201
 
202
202
/* Maximum number of duplicates an interval can allow.  Some systems
203
203
   (erroneously) define this in other header files, but we want our
204
204
   value, so remove any previous define.  */
205
205
#ifdef RE_DUP_MAX
206
206
#undef RE_DUP_MAX
207
207
#endif
208
 
#define RE_DUP_MAX ((1 << 15) - 1) 
 
208
#define RE_DUP_MAX ((1 << 15) - 1)
209
209
 
210
210
 
211
211
/* POSIX `cflags' bits (i.e., information for `regcomp').  */
217
217
/* If this bit is set, then ignore case when matching.
218
218
   If not set, then case is significant.  */
219
219
#define REG_ICASE (REG_EXTENDED << 1)
220
 
 
 
220
 
221
221
/* If this bit is set, then anchors do not match at newline
222
222
     characters in the string.
223
223
   If not set, then anchors do match at newlines.  */
256
256
  REG_EESCAPE,          /* Trailing backslash.  */
257
257
  REG_ESUBREG,          /* Invalid back reference.  */
258
258
  REG_EBRACK,           /* Unmatched left bracket.  */
259
 
  REG_EPAREN,           /* Parenthesis imbalance.  */ 
 
259
  REG_EPAREN,           /* Parenthesis imbalance.  */
260
260
  REG_EBRACE,           /* Unmatched \{.  */
261
261
  REG_BADBR,            /* Invalid contents of \{\}.  */
262
262
  REG_ERANGE,           /* Invalid range end.  */
268
268
  REG_ESIZE,            /* Compiled pattern bigger than 2^16 bytes.  */
269
269
  REG_ERPAREN           /* Unmatched ) or \); not returned from regcomp.  */
270
270
} reg_errcode_t;
271
 
 
 
271
 
272
272
/* This data structure represents a compiled pattern.  Before calling
273
273
   the pattern compiler, the fields `buffer', `allocated', `fastmap',
274
274
   `translate', and `no_sub' can be set.  After the pattern has been
287
287
  unsigned long allocated;
288
288
 
289
289
        /* Number of bytes actually used in `buffer'.  */
290
 
  unsigned long used;   
 
290
  unsigned long used;
291
291
 
292
292
        /* Syntax setting with which the pattern was compiled.  */
293
293
  reg_syntax_t syntax;
331
331
  unsigned no_sub : 1;
332
332
 
333
333
        /* If set, a beginning-of-line anchor doesn't match at the
334
 
           beginning of the string.  */ 
 
334
           beginning of the string.  */
335
335
  unsigned not_bol : 1;
336
336
 
337
337
        /* Similarly for an end-of-line anchor.  */
349
349
/* search.c (search_buffer) in Emacs needs this one opcode value.  It is
350
350
   defined both in `regex.c' and here.  */
351
351
#define RE_EXACTN_VALUE 1
352
 
 
 
352
 
353
353
/* Type for byte offsets within the string.  POSIX mandates this.  */
354
354
typedef int regoff_t;
355
355
 
380
380
  regoff_t rm_so;  /* Byte offset from string's start to substring's start.  */
381
381
  regoff_t rm_eo;  /* Byte offset from string's start to substring's end.  */
382
382
} regmatch_t;
383
 
 
 
383
 
384
384
/* Declarations for routines.  */
385
385
 
386
386
/* To avoid duplicating every routine declaration -- once with a
443
443
 
444
444
 
445
445
/* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
446
 
extern int re_match_2 
 
446
extern int re_match_2
447
447
  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
448
448
             int length1, const char *string2, int length2,
449
449
             int start, struct re_registers *regs, int stop));
480
480
extern void regfree _RE_ARGS ((regex_t *preg));
481
481
 
482
482
#endif /* not __REGEXP_LIBRARY_H__ */
483
 
 
 
483
 
484
484
/*
485
485
Local variables:
486
486
make-backup-files: t