Ruby  2.5.0dev(2017-10-22revision60238)
re.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  re.h -
4 
5  $Author$
6  created at: Thu Sep 30 14:18:32 JST 1993
7 
8  Copyright (C) 1993-2007 Yukihiro Matsumoto
9 
10 **********************************************************************/
11 
12 #ifndef RUBY_RE_H
13 #define RUBY_RE_H 1
14 
15 #if defined(__cplusplus)
16 extern "C" {
17 #if 0
18 } /* satisfy cc-mode */
19 #endif
20 #endif
21 
22 #include <sys/types.h>
23 #include <stdio.h>
24 
25 #include "ruby/regex.h"
26 
28 
29 typedef struct re_pattern_buffer Regexp;
30 
31 struct rmatch_offset {
32  long beg;
33  long end;
34 };
35 
36 struct rmatch {
37  struct re_registers regs;
38 
42 };
43 
44 struct RMatch {
45  struct RBasic basic;
47  struct rmatch *rmatch;
48  VALUE regexp; /* RRegexp */
49 };
50 
51 #define RMATCH(obj) (R_CAST(RMatch)(obj))
52 #define RMATCH_REGS(obj) (&(R_CAST(RMatch)(obj))->rmatch->regs)
53 
55 long rb_reg_search(VALUE, VALUE, long, int);
57 long rb_reg_adjust_startpos(VALUE, VALUE, long, int);
58 void rb_match_busy(VALUE);
61 int rb_reg_region_copy(struct re_registers *, const struct re_registers *);
62 
64 
65 #if defined(__cplusplus)
66 #if 0
67 { /* satisfy cc-mode */
68 #endif
69 } /* extern "C" { */
70 #endif
71 
72 #endif /* RUBY_RE_H */
Definition: re.h:44
long rb_reg_adjust_startpos(VALUE, VALUE, long, int)
Definition: re.c:1457
VALUE regexp
Definition: re.h:48
VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE)
Definition: re.c:3739
int char_offset_num_allocated
Definition: re.h:40
long beg
Definition: re.h:32
Definition: ruby.h:854
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:49
void rb_match_busy(VALUE)
Definition: re.c:1252
long rb_reg_search(VALUE, VALUE, long, int)
Definition: re.c:1578
unsigned long VALUE
Definition: ruby.h:85
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
struct rmatch * rmatch
Definition: re.h:47
Definition: re.h:36
VALUE str
Definition: re.h:46
typedefRUBY_SYMBOL_EXPORT_BEGIN struct re_pattern_buffer Regexp
Definition: re.h:29
VALUE rb_reg_quote(VALUE)
Definition: re.c:3425
regex_t * rb_reg_prepare_re(VALUE re, VALUE str)
Definition: re.c:1450
struct rmatch_offset * char_offset
Definition: re.h:41
long end
Definition: re.h:33
int rb_reg_region_copy(struct re_registers *, const struct re_registers *)
Definition: re.c:904
VALUE rb_reg_regcomp(VALUE)
Definition: re.c:2936
int char_offset_updated
Definition: re.h:39