summaryrefslogtreecommitdiff
path: root/regparse.c
AgeCommit message (Collapse)Author
2012-06-02* regparse.c (onig_number_of_names): suppress a warning.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-21* regcomp.c: Merge Onigmo 3d855b30d574536d3ae600260208c6624ae4791c.naruse
[Bug#6143] [Bug#6144] [Bug#6145] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-15* adjust style.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-29* regparse.c (is_onechar_cclass): optimize character classnaruse
Merge Onigmo 27278c12e6674043cc8affca6507e20e119a86ee. * regparse.c (is_onechar_cclass): [bug] unexpected match occurs when a char class contains no char * enc/unicode.c (init_case_fold_table): define the sizes of case folding tables in casefold.h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-26* regparse.c (add_code_range_to_buf0): wrong condition of duplicatednaruse
warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22* regparse.c (fetch_token): don't use // comment.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19* regparse.c: fix warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-17* Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]naruse
https://github.com/k-takata/Onigmo cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h cp oniguruma.h cp tool/enc-unicode.rb cp -r enc/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05* regparse.c: fix typo.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05* regparse.c (PFETCH_READY): separate gcc specific trick.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05* bignum.c (big_rshift), compile.c (validate_label,nobu
iseq_build_from_ary_exception), cont.c (cont_capture), dir.c (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open) (rb_io_advise), parse.y (parser_compile_string) (rb_parser_compile_file), proc.c (binding_free), process.c (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core) (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null), signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main), vm_insnhelper.c (vm_expandarray): suppress unused-but-set-variable warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31* addr2line.c: suppressed shorten-64-to-32 warnings.naruse
* regcomp.c: ditto. * regexec.c: ditto. * regint.h: ditto. * regparse.c: ditto. * regparse.h: ditto. * time.c: ditto. * variable.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-15* regparse.c (and_cclass, or_cclass): fix memory leak. Coverity Scanmame
found this bug. [ruby-dev:42579] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-31* regparse.c (onig_syntax_warn): do not use external strings asnobu
printf format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-25* regparse.c (add_code_range_to_buf0): fix false negativenaruse
warning when given range is just before previous range. [ruby-dev:41406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-01* include/ruby/oniguruma.h: updated to follow Oniguruma 5.9.2.matz
* re.c (make_regexp): use onig_new() instead of onig_alloc_init(). * re.c (rb_reg_to_s): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-28* regcomp.c (onig_compile): initialize ScanEnv.naruse
mainly to initialize env->warnings_flag [ruby-dev:40196] * regparse.c (scan_env_clear): clear warnings_flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-11* regparse.c (fetch_token): warn invalid back referencenaruse
and subexp call. (\k and \g). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-11* regparse.c (fetch_token_in_cc): warn when \p is notnaruse
followed by property name. * regparse.c (fetch_token): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-11* regerror.c (onig_vsnprintf_with_pattern): added.naruse
* regparse.c (onig_syntax_warn): use above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-10* regparse.c (onig_syntax_warn): added.naruse
* regparse.c (CC_ESC_WARN, CLOSE_BRACKET_WITHOUT_ESC_WARN, CC_DUP_WARN, UNKNOWN_ESC_WARN): use onig_syntax_warn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-22* regparse.c (st_str_end_key, str_end_cmp, str_end_hash):nobu
constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-10Warn unknown escaped chars in regexp.naruse
* regparse.c (UNKNOWN_ESC_WARN): added. * regparse.c (conv_backslash_value): Warn unknown escaped chars in regexp. [ruby-dev:39104] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-08* include/ruby/st.h (st_hash_func): use st_index_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-30*regparse.c (CC_DUP_WARN): use rb_compile_warn if ScanEnv has sourcenaruse
information. [ruby-dev:39105] *re.c (rb_reg_compile): add sourcefile and sourceline to the arguments. *re.c (make_regexp): ditto. *re.c (rb_reg_initialize): ditto. *re.c (rb_reg_initialize_str): ditto. *re.c (rb_reg_compile): ditto. *regcomp.c (onig_compile): ditto. *regint.h (onig_compile): ditto. *re.c (reg_compile_gen): follow above. *re.c (rb_reg_to_s): ditto. *re.c (make_regexp): ditto. *re.c (rb_reg_initialize): ditto. *re.c (rb_reg_initialize_str): ditto. *re.c (rb_reg_new_str): ditto. *re.c (rb_enc_reg_new): ditto. *re.c (rb_reg_initialize_m): ditto. *re.c (rb_reg_init_copy): ditto. *regcomp.c (onig_new): ditto. *regcomp.c (onig_compile): set sourcefile and sourceline to scan_env. *regparse.h (ScanEnv): add sourcefile and sourceline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-17Don't warn if the duplicate is caused by /i.naruse
* regparse.c (add_code_range_to_buf0): added with checkdup argument. * regparse.c (add_code_range_to_buf): use above. * regparse.c (add_code_range0): added with checkdup argument. * regparse.c (add_code_range): use above. * regparse.c (i_apply_case_fold): don't warn if the duplicate is git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16* regparse.c: commit miss again.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16* regparse.c: commit miss.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-16* regparse.c (parse_char_class, parse_exp, parse_branch),nobu
(parse_subexp): fixed memory leak. a patch from Ralf Junker <ralfjunker AT gmx.de> at [ruby-core:24921]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-15* regparse.c (add_ctype_to_cc_by_range): fix the firstnaruse
character bigger than sb_out was dropped. * test/ruby/test_regexp.rb (TestRegexp#test_posix_bracket): add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-15\d, \s and \w are now non Unicode class. [ruby-dev:39026]naruse
* include/ruby/oniguruma.h (ONIGENC_CTYPE_SPECIAL_MASK): added. (ONIGENC_CTYPE_D): ditto. (ONIGENC_CTYPE_S): ditto. (ONIGENC_CTYPE_W): ditto. * regparse.c: \d, \s and \w are now non Unicode class. [ruby-dev:39026] (fetch_token_in_cc): use ONIGENC_CTYPE_[DSW] for \d/\s/\w. (fetch_token): ditto. (add_ctype_to_cc): add routines for ONIGENC_CTYPE_[DSW]. (parse_exp): ditto. * test/ruby/test_regexp.rb (TestRegexp#test_char_class): add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04Warn duplicated characters in character class of regexp. [ruby-core:24593]naruse
* include/ruby/oniguruma.h (ONIG_SYN_WARN_CC_DUP): defined. * regparse.h (ScanEnv): add warnings_flag. * regparse.c (CC_DUP_WARN): defined for warn duplicated characters in character class of regexp. [ruby-core:24593] (add_code_range_to_buf): add CC_DUP_WARN. (next_state_val): add CC_DUP_WARN. (OnigSyntaxRuby): add ONIG_SYN_WARN_CC_DUP. (SET_ALL_MULTI_BYTE_RANGE): add env to arguments. (add_code_range): ditto. (add_code_range_to_buf): ditto. (not_code_range_buf): ditto. (or_code_range_buf): ditto. (and_code_range1): ditto. (and_code_range_buf): ditto. (and_cclass): ditto. (or_cclass): ditto. (add_ctype_to_cc_by_range): ditto. (add_ctype_to_cc): ditto. (parse_char_class): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-30* include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,nobu
regenc.c, regerror.c, regexec.c, regint.h, regparse.c: use long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22stripped trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-29* regparse.c (is_invalid_quantifier_target): Perl and old Rubymatz
accepts quantifier on anchors. [ruby-core:20161] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20* regparse.c (parse_char_class): CCV_SB is only for singlenobu
byte. [ruby-dev:36786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20* regparse.c (parse_char_class): CCV_SB is only for singlenobu
byte. [ruby-dev:36786] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13* include/ruby/oniguruma.h (onigenc_get_prev_char_head): add endakr
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@19332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-12* regparse.c (parse_exp): fix resource leak.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30* regparse.c (parse_exp): fix memory leak.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-30* regparse.c (parse_exp): fix memory leak at Regexp.new("x{1,1}").mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01* regexec.c (stack_double): use MatchStackLimitSize atomically.nobu
* regparse.c (onig_free_shared_cclass_table): OnigTypeCClassTable needs atomicity * regsyntax.c: constified all predefined OnigSyntaxTypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19* regparse.c (PINC): use optimized enclen() instead ofmatz
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: svn+ssh://ci.ruby-lang.org/ruby/trunk@16477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22* enumerator.c (enumerator_each, enumerator_with_index): suppressnobu
warnings. * pack.c (pack_unpack): ditto. * process.c (rb_syswait): ditto. * re.c (rb_reg_prepare_enc, rb_reg_prepare_re, rb_reg_adjust_startpos): ditto. * regparse.c (onig_name_to_group_numbers): ditto. * missing/vsnprintf.c (BSD_vfprintf): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-03* include/ruby/oniguruma.h: Oniguruma 1.9.1 merged.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-05* regparse.c (i_apply_case_fold): fix for negative character class. anobu
patch from Yusuke ENDOH <mame AT tsg.ne.jp> in [ruby-core:13884]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-06* array.c (rb_ary_cycle): typo in rdoc. a patch from Yuguimatz
<yugui@yugui.sakura.ne.jp>. [ruby-dev:31748] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-23* include/ruby/oniguruma.h: upgrade to Oniguruma 5.9.0. fixesmatz
some memory violation. [ruby-dev:31070] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-05* include/ruby/st.h, st.c (st_init_table, st_init_table_with_size):nobu
constified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10* include/ruby: moved public headers.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e