Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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
27 #if defined __GNUC__ && __GNUC__ >= 4
28 #pragma GCC visibility push(default)
29 #endif
30
31 typedef struct re_pattern_buffer Regexp;
32
33 struct rmatch_offset {
34 long beg;
35 long end;
36 };
37
38 struct rmatch {
39 struct re_registers regs;
40
41 int char_offset_updated;
42 int char_offset_num_allocated;
43 struct rmatch_offset *char_offset;
44 };
45
46 struct RMatch {
47 struct RBasic basic;
48 VALUE str;
49 struct rmatch *rmatch;
50 VALUE regexp; /* RRegexp */
51 };
52
53 #define RMATCH(obj) (R_CAST(RMatch)(obj))
54 #define RMATCH_REGS(obj) (&(R_CAST(RMatch)(obj))->rmatch->regs)
55
56 VALUE rb_reg_regcomp(VALUE);
57 long rb_reg_search(VALUE, VALUE, long, int);
58 VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE);
59 long rb_reg_adjust_startpos(VALUE, VALUE, long, int);
60 void rb_match_busy(VALUE);
61 VALUE rb_reg_quote(VALUE);
62 regex_t *rb_reg_prepare_re(VALUE re, VALUE str);
63
64 #if defined __GNUC__ && __GNUC__ >= 4
65 #pragma GCC visibility pop
66 #endif
67
68 #if defined(__cplusplus)
69 #if 0
70 { /* satisfy cc-mode */
71 #endif
72 } /* extern "C" { */
73 #endif
74
75 #endif /* RUBY_RE_H */
RMatch
Definition: re.h:46
rb_reg_adjust_startpos
long rb_reg_adjust_startpos(VALUE, VALUE, long, int)
Definition: re.c:1321
RMatch::regexp
VALUE regexp
Definition: re.h:50
rb_match_busy
void rb_match_busy(VALUE)
Definition: re.c:1189
RMatch::basic
struct RBasic basic
Definition: re.h:47
rb_reg_regsub
VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE)
Definition: re.c:3286
rmatch::regs
struct re_registers regs
Definition: re.h:39
re_pattern_buffer
Definition: ripper.y:659
rmatch::char_offset_num_allocated
int char_offset_num_allocated
Definition: re.h:42
re_registers
Definition: ripper.y:613
rmatch_offset::beg
long beg
Definition: re.h:34
str
static VALUE char * str
Definition: tcltklib.c:3547
RBasic
Definition: ripper.y:699
regex.h
rb_reg_search
long rb_reg_search(VALUE, VALUE, long, int)
Definition: re.c:1352
RMatch::rmatch
struct rmatch * rmatch
Definition: re.h:49
rmatch
Definition: re.h:38
RMatch::str
VALUE str
Definition: re.h:48
rb_reg_quote
VALUE rb_reg_quote(VALUE)
Definition: re.c:2965
rb_reg_prepare_re
regex_t * rb_reg_prepare_re(VALUE re, VALUE str)
Definition: re.c:1282
rmatch::char_offset
struct rmatch_offset * char_offset
Definition: re.h:43
rmatch_offset::end
long end
Definition: re.h:35
VALUE
unsigned long VALUE
Definition: ripper.y:104
rb_reg_regcomp
VALUE rb_reg_regcomp(VALUE)
Definition: re.c:2547
rmatch::char_offset_updated
int char_offset_updated
Definition: re.h:41
rmatch_offset
Definition: re.h:33