Ruby  2.7.2p137(2020-10-01revision5445e0435260b449decf2ac16f9d09bae3cafe72)
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 
41 };
42 
43 struct RMatch {
44  struct RBasic basic;
46  struct rmatch *rmatch;
47  VALUE regexp; /* RRegexp */
48 };
49 
50 #define RMATCH(obj) (R_CAST(RMatch)(obj))
51 #define RMATCH_REGS(obj) (&(R_CAST(RMatch)(obj))->rmatch->regs)
52 
54 long rb_reg_search(VALUE, VALUE, long, int);
56 long rb_reg_adjust_startpos(VALUE, VALUE, long, int);
57 void rb_match_busy(VALUE);
60 int rb_reg_region_copy(struct re_registers *, const struct re_registers *);
61 
63 
64 #if defined(__cplusplus)
65 #if 0
66 { /* satisfy cc-mode */
67 #endif
68 } /* extern "C" { */
69 #endif
70 
71 #endif /* RUBY_RE_H */
RMatch::regexp
VALUE regexp
Definition: re.h:47
RMatch::basic
struct RBasic basic
Definition: re.h:44
rmatch::regs
struct re_registers regs
Definition: re.h:37
RUBY_SYMBOL_EXPORT_END
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:49
rb_reg_search
long rb_reg_search(VALUE, VALUE, long, int)
Definition: re.c:1612
rb_reg_adjust_startpos
long rb_reg_adjust_startpos(VALUE, VALUE, long, int)
Definition: re.c:1498
VALUE
unsigned long VALUE
Definition: ruby.h:102
RMatch
Definition: re.h:43
rb_reg_region_copy
int rb_reg_region_copy(struct re_registers *, const struct re_registers *)
Definition: re.c:946
rb_reg_prepare_re
regex_t * rb_reg_prepare_re(VALUE re, VALUE str)
Definition: re.c:1491
rb_reg_regsub
VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE)
Definition: re.c:3776
rmatch::char_offset
struct rmatch_offset * char_offset
Definition: re.h:39
Regexp
typedefRUBY_SYMBOL_EXPORT_BEGIN struct re_pattern_buffer Regexp
Definition: re.h:29
rb_reg_quote
VALUE rb_reg_quote(VALUE)
Definition: re.c:3462
regex.h
re_pattern_buffer
Definition: onigmo.h:755
rmatch::char_offset_num_allocated
int char_offset_num_allocated
Definition: re.h:40
rb_reg_regcomp
VALUE rb_reg_regcomp(VALUE)
Definition: re.c:2970
RUBY_SYMBOL_EXPORT_BEGIN
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:48
str
char str[HTML_ESCAPE_MAX_LEN+1]
Definition: escape.c:18
rmatch_offset::beg
long beg
Definition: re.h:32
rb_match_busy
void rb_match_busy(VALUE)
Definition: re.c:1287
re_registers
Definition: onigmo.h:716
rmatch_offset::end
long end
Definition: re.h:33
RMatch::str
VALUE str
Definition: re.h:45
RMatch::rmatch
struct rmatch * rmatch
Definition: re.h:46
rmatch_offset
Definition: re.h:31
rmatch
Definition: re.h:36