include/ruby/re.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 
00003   re.h -
00004 
00005   $Author: akr $
00006   created at: Thu Sep 30 14:18:32 JST 1993
00007 
00008   Copyright (C) 1993-2007 Yukihiro Matsumoto
00009 
00010 **********************************************************************/
00011 
00012 #ifndef RUBY_RE_H
00013 #define RUBY_RE_H 1
00014 
00015 #if defined(__cplusplus)
00016 extern "C" {
00017 #if 0
00018 } /* satisfy cc-mode */
00019 #endif
00020 #endif
00021 
00022 #include <sys/types.h>
00023 #include <stdio.h>
00024 
00025 #include "ruby/regex.h"
00026 
00027 typedef struct re_pattern_buffer Regexp;
00028 
00029 struct rmatch_offset {
00030     long beg;
00031     long end;
00032 };
00033 
00034 struct rmatch {
00035     struct re_registers regs;
00036 
00037     int char_offset_updated;
00038     int char_offset_num_allocated;
00039     struct rmatch_offset *char_offset;
00040 };
00041 
00042 struct RMatch {
00043     struct RBasic basic;
00044     VALUE str;
00045     struct rmatch *rmatch;
00046     VALUE regexp;  /* RRegexp */
00047 };
00048 
00049 #define RMATCH(obj)  (R_CAST(RMatch)(obj))
00050 #define RMATCH_REGS(obj)  (&(R_CAST(RMatch)(obj))->rmatch->regs)
00051 
00052 VALUE rb_reg_regcomp(VALUE);
00053 long rb_reg_search(VALUE, VALUE, long, int);
00054 VALUE rb_reg_regsub(VALUE, VALUE, struct re_registers *, VALUE);
00055 long rb_reg_adjust_startpos(VALUE, VALUE, long, int);
00056 void rb_match_busy(VALUE);
00057 VALUE rb_reg_quote(VALUE);
00058 
00059 #if defined(__cplusplus)
00060 #if 0
00061 { /* satisfy cc-mode */
00062 #endif
00063 }  /* extern "C" { */
00064 #endif
00065 
00066 #endif /* RUBY_RE_H */
00067 

Generated on Wed Aug 10 09:17:07 2011 for Ruby by  doxygen 1.4.7