summaryrefslogtreecommitdiff
path: root/regcomp.c
AgeCommit message (Collapse)Author
2018-09-15Fix issues detected by code analysis tool (mainly Coverity).nobu
* Fix leaked storage in addr2line.c. * Fix for "top_root" leaking the resource. [Fix GH-1956] From: Jun Aruga <jaruga@redhat.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-18Fix typos.hsbt
* rememberd -> remembered * refered -> referred git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-11Merge Onigmo 6.1.1naruse
* Support absent operator https://github.com/k-takata/Onigmo/issues/82 * https://github.com/k-takata/Onigmo/blob/Onigmo-6.1.1/HISTORY git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-25regcomp.c: debug function [ci skip]nobu
* regcomp.c (print_indent_tree): make a function for debug static. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-21regcomp.c: Fix compile error with old version of fcc on Solarisngoto
* regcomp.c (get_min_match_length): Fix compile error with old version of fcc (Fujitsu C Compiler) on Solaris 10. [Bug #13059][ruby-dev:49909] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-10Merge Onigmo 6.0.0naruse
* https://github.com/k-takata/Onigmo/blob/Onigmo-6.0.0/HISTORY * fix for ruby 2.4: https://github.com/k-takata/Onigmo/pull/78 * suppress warning: https://github.com/k-takata/Onigmo/pull/79 * include/ruby/oniguruma.h: include onigmo.h. * template/encdb.h.tmpl: ignore duplicated definition of EUC-CN in enc/euc_kr.c. It is defined in enc/gb2313.c with CRuby macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-30Regexp supports Unicoe 9.0.0's \Xnaruse
* meta character \X matches Unicode 9.0.0 characters with some workarounds for UTR #51 Unicode Emoji, Version 4.0 emoji zwj sequences. [Feature #12831] [ruby-core:77586] The term "character" can have many meanings bytes, codepoints, combined characters, and so on. "grapheme cluster" is highest one of such words, which means user-perceived characters. Unicode Standard Annex #29 UNICODE TEXT SEGMENTATION specifies how to handle grapheme clusters (extended grapheme cluster). But some specs aren't updated to current situation because Unicode Emoji is rapidly extended without well definition. It breaks the precondition of UTR#29 "Grapheme cluster boundaries can be easily tested by looking at immediately adjacent characters". (the sentence will be removed in the next version) Though some of its detail are described in Unicode Technical Report #51 UNICODE EMOJI but it is not merged into UTR#29 yet. http://unicode.org/reports/tr29/ http://unicode.org/reports/tr51/ http://unicode.org/Public/emoji/4.0/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03* regcomp.c (onig_print_compiled_byte_code): make the shown addressnaruse
look relative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-01* regcomp.c (noname_disable_map): don't optimize out group 0naruse
Ruby's Regexp doesn't allow normal numbered groups if the regexp has named groups. On such case it optimizes out related NT_ENCLOSE. But even on the case it can use \g<0>. This fix not to remove NT_ENCLOSE whose regnum is 0. [ruby-core:75828] [Bug #12454] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-25regcomp.c: fix debug conditionalsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-25* regcomp.c: remove condition for debug output because preludenaruse
doesn't use regexp now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-25* regcomp.c (compile_length_tree): return error code immediatelynaruse
if compile_length_tree raised error [Bug #12418] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09Revert r52995nobu
revert slow atomic operations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09use atomic operationsnobu
* regcomp.c (onig_chain_link_add): use atomic operation instead of mutex. * regint.h (ONIG_STATE_{INC,DEC}_THREAD): ditto. * regparse.c (PopFreeNode, node_recycle): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-26* regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:naruse
Merge Onigmo 58fa099ed1a34367de67fb3d06dd48d076839692 + https://github.com/k-takata/Onigmo/pull/52 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-15* reg*.c: Merge Onigmo 5.15.0 38a870960aa7370051a3544naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-16* regcomp.c: Merge Onigmo 5.14.1 25a8a69fc05ae3b56a09.naruse
this includes Support for Unicode 7.0 [Bug #9092]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-04* regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.naruse
https://bugs.ruby-lang.org/issues/8583 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-13* Merge Onigmo 5.13.4 f22cf2e566712cace60d17f84d63119d7c5764ee.naruse
[bug] fix problem with optimization of \z (Issue #16) [Bug #8210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-01* Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757fnaruse
v5.13.3 [Bug#7972] [Bug#7974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-05Remove unused variables.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18* regcomp.c, regexec.c: fix-up warnings.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34684 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-15* regcomp.c (onig_region_memsize): implemented for memsize_of().nobu
* ext/objspace/objspace.c (memsize_of): use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05* class.c (rb_obj_methods), compile.c (iseq_compile_each),nobu
iseq.c(iseq_load, rb_iseq_parameters), pack.c (pack_pack), regcomp.c (is_not_included, update_string_node_case_fold), transcode.c (rb_econv_open0, make_replacement), vm_eval.c (raise_method_missing): remove unused variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-15* regcomp.c (print_indent_tree): fix double printing of ENCLOSE_OPTIONnaruse
children bug. patched by Suraj Kurapati. [ruby-core:40964] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-23Show encoding of compiling regexp.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30943 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-26* regcomp.c (setup_tree): restart setup_tree() for a node whosenaruse
AnchorNode's type is ANCHOR_PREC_BEHIND or ANCHOR_PREC_BEHIND_NOT and divide_look_behind_alternatives() divided it to NT_ALT or NT_LIST. [ruby-core:33370] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-26* regcomp.c (onig_is_prelude): added to check whether ruby is stillnaruse
in prelude (or other boot processes) or not. * regcomp.c (optimize_node_left): use onig_is_prelude for printing. * regcomp.c (set_optimize_info_from_tree): ditto. * regcomp.c (onig_compile): ditto. * regcomp.c (print_compiled_byte_code_list): print its address. * regcomp.c (print_indent_tree): print its contents tree of ANCHOR_PREC_READ(_NOT) and ANCHOR_PREC_BEHIND(_NOT). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-25* regcomp.c (print_distance_range): use PRIuSIZE.naruse
* regcomp.c (print_optimize_info): use %ld because the type of calcutated value of integers is long. * regexec.c (onig_print_compiled_byte_code): add prototype. * regexec.c (match_at): add 2nd argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-17* regint.h (OnigOpInfoType): constify name.naruse
* regcomp.c (op2name): constify return value. * regcomp.c (onig_print_compiled_byte_code): use PRIuPTR and uintptr_t to clean warnings. * regcomp.c (print_indent_tree): use PRIxPTR and intptr_t. * regexec.c (match_at): use PRIdPTR and intptr_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-17* regcomp.c: revert r26701; it introduces Bug #3681.naruse
[ruby-core:31677] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-14* regcomp.c (onig_memsize): constified.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-02* regcomp.c (noname_disable_map): add NT_ANCHOR case.naruse
Without this change, captured groups in anchors (look-ahead, look-behind, and so on) are not removed and unintended invalid backref error occur. [ruby-core:28235] * regcomp.c (renumber_by_map): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26796 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-02-17* regcomp.c (setup_tree, onig_compile): optimize .* at last bymame
converting into (?>.*), which does not backtrack. [ruby-core:27791] * test/ruby/test_regexp.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26701 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-12-21* regcomp.c (optimize_node_left): include equal on the condition of for-loop.naruse
This bug also affects original Oniguruma. [ruby-core:27247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-21* regcomp.c (print_enc_string): follow enclen's change.naruse
* regcomp.c (onig_print_compiled_byte_code): ditto. * regcomp.c (onig_print_compiled_byte_code): change prototype. * regint.c (onig_print_compiled_byte_code): comment out. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26138 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-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-06-16* array.c (rb_ary_memsize): added.ko1
* io.c (rb_io_memsize): added. * regcomp.c (onig_memsize): added. * string.c (rb_str_memsize): added. * transcode.c (rb_transcoding_memsize, rb_econv_memsize): added. * variable.c (rb_geneic_ivar_memsize): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23714 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-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-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-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-05-23* oniguruma.h: updated to Oniguruma 5.7.0.matz
* regsyntax.c, unicode.c: new files along with Oniguruma 5.x. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-19* regparse.c, etc.: K&R to ANSI code cleanup patch from Stefanmatz
Huehner <stefan at huehner.org>. [ruby-core:10543] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e