Ruby  2.1.10p492(2016-04-01revision54464)
re.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  re.h -
4 
5  $Author: nobu $
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 {
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 
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 */
Definition: re.h:44
long rb_reg_adjust_startpos(VALUE, VALUE, long, int)
Definition: re.c:1378
VALUE regexp
Definition: re.h:48
void rb_match_busy(VALUE)
Definition: re.c:1246
struct RBasic basic
Definition: re.h:45
VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE)
Definition: re.c:3337
struct re_registers regs
Definition: re.h:37
int char_offset_num_allocated
Definition: re.h:40
long beg
Definition: re.h:32
static VALUE char * str
Definition: tcltklib.c:3539
Definition: ripper.y:747
#define RUBY_SYMBOL_EXPORT_END
Definition: missing.h:39
long rb_reg_search(VALUE, VALUE, long, int)
Definition: re.c:1410
#define RUBY_SYMBOL_EXPORT_BEGIN
Definition: missing.h:38
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:3013
regex_t * rb_reg_prepare_re(VALUE re, VALUE str)
Definition: re.c:1339
struct rmatch_offset * char_offset
Definition: re.h:41
long end
Definition: re.h:33
unsigned long VALUE
Definition: ripper.y:88
VALUE rb_reg_regcomp(VALUE)
Definition: re.c:2597
int char_offset_updated
Definition: re.h:39