summaryrefslogtreecommitdiffstats
path: root/regexec.c
Commit message (Collapse)AuthorAgeFilesLines
* * include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,nobu2009-06-301-7/+7
| | | | | | | regenc.c, regerror.c, regexec.c, regint.h, regparse.c: use long. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stripped trailing spaces.nobu2009-02-221-7/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c (string_cmp_ic): add text_end argument.akr2008-09-181-16/+15
| | | | | | | | (slow_search): call enclen with real string end. (map_search): add text_end argument. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * grapheme cluster implementation reverted. [ruby-dev:36375]akr2008-09-181-39/+13
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (OnigEncodingTypeST): add precise_retakr2008-09-161-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | argument for mbc_to_code. (ONIGENC_MBC_TO_CODE): provide NULL for precise_ret. (ONIGENC_MBC_PRECISE_CODEPOINT): defined. * include/ruby/encoding.h (rb_enc_mbc_precise_codepoint): defined. * regenc.h (onigenc_single_byte_mbc_to_code): precise_ret argument added. (onigenc_mbn_mbc_to_code): ditto. * regenc.c (onigenc_single_byte_mbc_to_code): precise_ret argument added. (onigenc_mbn_mbc_to_code): ditto. * string.c (count_utf8_lead_bytes_with_word): removed. (str_utf8_nth): removed. (str_utf8_offset): removed. (str_strlen): UTF-8 codepoint oriented optimization removed. (rb_str_substr): ditto. (enc_succ_char): use rb_enc_mbc_precise_codepoint. (enc_pred_char): ditto. (rb_str_succ): ditto. * encoding.c (rb_enc_ascget): check length with rb_enc_mbc_precise_codepoint. (rb_enc_codepoint): use rb_enc_mbc_precise_codepoint. * regexec.c (string_cmp_ic): add text_end argument. (match_at): check end of character after exact string matches. * enc/utf_8.c (graphme_table): defined for extended graphme cluster boundary. (grapheme_cmp): defined. (get_grapheme_properties): defined. (grapheme_boundary_p): defined. (MAX_BYTES_LENGTH): defined. (comb_char_enc_len): defined. (mbc_to_code0): extracted from mbc_to_code. (mbc_to_code): use mbc_to_code0. (left_adjust_combchar_head): defined. (utf_8): use a extended graphme cluster as a unit. * enc/unicode.c (onigenc_unicode_mbc_case_fold): use ONIGENC_MBC_PRECISE_CODEPOINT to extract codepoints. (onigenc_unicode_get_case_fold_codes_by_str): ditto. * enc/euc_jp.c (mbc_to_code): follow mbc_to_code field change. use onigenc_mbn_mbc_to_code. * enc/shift_jis.c (mbc_to_code): ditto. * enc/emacs_mule.c (mbc_to_code): ditto. * enc/gbk.c (gbk_mbc_to_code): follow mbc_to_code field and onigenc_mbn_mbc_to_code change. * enc/cp949.c (cp949_mbc_to_code): ditto. * enc/big5.c (big5_mbc_to_code): ditto. * enc/euc_tw.c (euctw_mbc_to_code): ditto. * enc/euc_kr.c (euckr_mbc_to_code): ditto. * enc/gb18030.c (gb18030_mbc_to_code): ditto. * enc/utf_32be.c (utf32be_mbc_to_code): follow mbc_to_code field change. * enc/utf_16be.c (utf16be_mbc_to_code): ditto. * enc/utf_32le.c (utf32le_mbc_to_code): ditto. * enc/utf_16le.c (utf16le_mbc_to_code): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (OnigEncodingTypeST): add end argument forakr2008-09-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | left_adjust_char_head. (ONIGENC_LEFT_ADJUST_CHAR_HEAD): add end argument. (onigenc_get_left_adjust_char_head): ditto. * include/ruby/encoding.h (rb_enc_left_char_head): add end argument. * regenc.h (onigenc_single_byte_left_adjust_char_head): ditto. * regenc.c (onigenc_get_right_adjust_char_head): follow the interface change. (onigenc_get_right_adjust_char_head_with_prev): ditto. (onigenc_get_prev_char_head): ditto. (onigenc_step_back): ditto. (onigenc_get_left_adjust_char_head): ditto. (onigenc_single_byte_code_to_mbc): ditto. * re.c: ditto. * string.c: ditto. * io.c: ditto. * regexec.c: ditto. * enc/euc_jp.c: ditto. * enc/cp949.c: ditto. * enc/shift_jis.c: ditto. * enc/gbk.c: ditto. * enc/big5.c: ditto. * enc/euc_tw.c: ditto. * enc/euc_kr.c: ditto. * enc/emacs_mule.c: ditto. * enc/gb18030.c: ditto. * enc/utf_8.c: ditto. * enc/utf_16le.c: ditto. * enc/utf_16be.c: ditto. * enc/utf_32le.c: ditto. * enc/utf_32be.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (ONIGENC_STEP_BACK): add end argument.akr2008-09-131-4/+4
| | | | | | | | | | | | (onigenc_step_back): ditto. * regenc.c (onigenc_step_back): add end argument. * regexec.c: follow the interface change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (onigenc_get_prev_char_head): add endakr2008-09-131-19/+19
| | | | | | | | | | | | | | | | | | | | argument. * include/ruby/encoding.h (rb_enc_prev_char): ditto. * regenc.c (onigenc_get_prev_char_head): add end argument. * regparse.c: follow the interface change. * regexec.c: ditto. * string.c: ditto. * parse.y: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.hakr2008-09-131-1/+1
| | | | | | | | | | | | | (onigenc_get_right_adjust_char_head_with_prev): add end argument. * regenc.c (onigenc_get_right_adjust_char_head_with_prev): use end argument. * regexec.c (forward_search_range): follow the interface change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h (onigenc_get_right_adjust_char_head): addakr2008-09-131-2/+2
| | | | | | | | | | | | | | | | | | | end argument. * include/ruby/encoding.h (rb_enc_right_char_head): add end argument. * regenc.c (onigenc_get_right_adjust_char_head): use end argument. * re.c (rb_reg_adjust_startpos): follow the interface change. * string.c (rb_str_index): ditto. * regexec.c (backward_search_range): ditto. (onig_search): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c (stack_double): use MatchStackLimitSize atomically.nobu2008-07-011-7/+8
| | | | | | | | | | * regparse.c (onig_free_shared_cclass_table): OnigTypeCClassTable needs atomicity * regsyntax.c: constified all predefined OnigSyntaxTypes. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c (slow_search): check the case when the length is 1.mame2008-05-191-2/+2
| | | | | | | The behavior of memcmp is undefined if the third argument is 0. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regparse.c (PINC): use optimized enclen() instead ofmatz2008-05-191-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ONIGENC_MBC_ENC_LEN(). * regparse.c (PFETCH): ditto. * regparse.c (PFETCH): small optimization. * regexec.c (slow_search): single byte encoding optimization. * regenc.h (enclen): avoid calling function when encoding's min_len == max_len. * re.c (rb_reg_regsub): rb_enc_ascget() optimization for single byte encoding. * re.c (rb_reg_search): avoid allocating new re_registers if we already have MatchData. * re.c (match_init_copy): avoid unnecessary onig_region_free() before onig_region_copy. * encoding.c (rb_enc_get_index): remove implicit enc_capable check each time. * encoding.c (rb_enc_set_index): ditto. * encoding.c (enc_compatible_p): small refactoring. * include/ruby/encoding.h (rb_enc_dummy_p): inline rb_enc_dummy_p() and export related code. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_sort_bang): stop memory leak. [ruby-dev:34726]matz2008-05-161-20/+28
| | | | | | | | | | | | | | * re.c (rb_reg_search): need to free allocated buffer in re_register. * regexec.c (onig_region_new): more pedantic malloc check. * regexec.c (onig_region_resize): ditto. * regexec.c (STATE_CHECK_BUFF_INIT): ditto. * regexec.c (onig_region_copy): use onig_region_resize. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_search): avoid inner loop for reverse search.matz2008-01-041-1/+1
| | | | | | | * regexec.c: unset USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE which is turned on since oniguruma 5.9.1. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: Oniguruma 1.9.1 merged.matz2008-01-031-59/+62
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_cycle): typo in rdoc. a patch from Yuguimatz2007-09-061-34/+34
| | | | | | <yugui@yugui.sakura.ne.jp>. [ruby-dev:31748] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: upgrade to Oniguruma 5.9.0. fixesmatz2007-07-231-263/+214
| | | | | | some memory violation. [ruby-dev:31070] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * oniguruma.h: updated to Oniguruma 5.7.0.matz2007-05-231-300/+231
| | | | | | * regsyntax.c, unicode.c: new files along with Oniguruma 5.x. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix offset value in STATE_CHECK_BUFF_INIT()kosako2006-10-291-1/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge Oniguruma 4.4.5kosako2006-10-281-9/+28
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge Oniguruma 4.4.4kosako2006-09-231-7/+7
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge Oniguruma 4.4.0kosako2006-08-271-25/+218
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge Oniguruma 4.2.2kosako2006-08-051-62/+168
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix bug [ruby-list:42234]kosako2006-05-211-1/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge Oniguruma 4.0.3kosako2006-05-101-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* merge Oniguruma 4.0.1kosako2006-02-121-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * oniguruma.h: merge Oniguruma 4.0.0 [ruby-dev:28290]matz2006-02-041-29/+86
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c: moved to ANSI function style from K&R function style.ocean2005-09-121-1/+1
| | | | | | | | | | | | | | | | | (used protoize on windows, so still K&R remains on #ifdef part of other platforms. And `foo _((boo))' stuff is still there) [ruby-dev:26975] * bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c, prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c, regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c, sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c, version.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (parser_yylex): update paren_nest for brackets [].matz2005-08-201-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, regenc.h, ↵ksaito2005-02-231-84/+116
| | | | | | regerror.c, regexec.c, regint.h, regparse.c, regparse.h, sjis.c, utf8.c: imported Oni Guruma 3.7.0. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ascii.c, euc_jp.c, hash.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, ↵ksaito2005-01-281-61/+123
| | | | | | regenc.h, regerror.c, regexec.c, reggnu.c, regint.h, regparse.c, regparse.h, sjis.c, st.c, st.h, utf8.c: imported Oni Guruma 3.5.4. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c, test/ruby/test_regexp.rb: fixed segmentation falut ↵ksaito2004-11-281-1/+1
| | | | | | ([ruby-dev:24887]). git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regexec.c, regparse.c, regint.h: fixed conflicts between vendor branch.ksaito2004-11-041-8/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ascii.c, euc_jp.c, oniggnu.h, oniguruma.h, regcomp.c, regenc.c, regenc.h, ↵ksaito2004-11-041-330/+483
| | | | | | | | | | | regerror.c, regexec.c, reggnu.c, regint.h, regparse.c, regparse.h, sjis.c, utf8.c: imported Oni Guruma 3.4.0. * parse.y, re.c: Now mbclen() takes unsigned char as its argument. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_uniq_bang): do not push frozen string from hashmatz2004-11-031-1/+1
| | | | | | | | | | | table. [ruby-dev:24695] * array.c (rb_ary_and): ditto. * array.c (rb_ary_or): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (proc_invoke): nail down dyna_var node when Proc objectmatz2004-11-011-1/+2
| | | | | | | | | or continuation is created. [ruby-dev:24671] * io.c (rb_io_s_popen): do not expand argv array. [ruby-dev:24670] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): NODE_XSTR should pass copy of literal string.matz2004-10-301-61/+50
| | | | | | | | | | | * array.c (rb_ary_update): a[n,m]=nil no longer works as element deletion. * enum.c (enum_sort_by): protect continuation jump in. [ruby-dev:24642] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r6231,ksaito2004-04-271-8/+32
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r6227,ksaito2004-04-271-32/+8
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r6225,ksaito2004-04-271-22/+35
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* This commit was generated by cvs2svn to compensate for changes in r6093,ksaito2004-04-051-0/+1
| | | | | | | which included commits to RCS files with non-trunk default branches. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@6094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial revisionksaito2004-03-051-0/+3299
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e