]> granicus.if.org Git - onig/log
onig
7 years agodefine ANCHOR_HAS_BODY() macro
K.Kosako [Thu, 8 Jun 2017 07:52:10 +0000 (16:52 +0900)]
define ANCHOR_HAS_BODY() macro

7 years agomove comment
K.Kosako [Thu, 8 Jun 2017 07:39:38 +0000 (16:39 +0900)]
move comment

7 years agoescape warnings in ONIG_DEBUG_SEARCH
K.Kosako [Thu, 8 Jun 2017 07:17:33 +0000 (16:17 +0900)]
escape warnings in ONIG_DEBUG_SEARCH

7 years agoescape warnings in ONIG_DEBUG_PARSE_TREE
K.Kosako [Thu, 8 Jun 2017 07:13:33 +0000 (16:13 +0900)]
escape warnings in ONIG_DEBUG_PARSE_TREE

7 years agouse NODE_BODY in invalidated codes
K.Kosako [Thu, 8 Jun 2017 07:05:21 +0000 (16:05 +0900)]
use NODE_BODY in invalidated codes

7 years agosmall change
K.Kosako [Thu, 8 Jun 2017 07:03:48 +0000 (16:03 +0900)]
small change

7 years agosmall refactoring
K.Kosako [Thu, 8 Jun 2017 06:52:44 +0000 (15:52 +0900)]
small refactoring

7 years agorename NODE_STATUS_CLEAR() to NODE_STATUS_REMOVE()
K.Kosako [Thu, 8 Jun 2017 06:41:27 +0000 (15:41 +0900)]
rename NODE_STATUS_CLEAR() to NODE_STATUS_REMOVE()

7 years agorename NODE_STATUS_SET() to NODE_STATUS_ADD()
K.Kosako [Thu, 8 Jun 2017 06:38:59 +0000 (15:38 +0900)]
rename NODE_STATUS_SET() to NODE_STATUS_ADD()

7 years agoremove redandant cast
K.Kosako [Thu, 8 Jun 2017 06:36:57 +0000 (15:36 +0900)]
remove redandant cast

7 years agoremove redundant cast
K.Kosako [Thu, 8 Jun 2017 06:33:46 +0000 (15:33 +0900)]
remove redundant cast

7 years agodefine NODE_STATUS macro
K.Kosako [Thu, 8 Jun 2017 05:34:17 +0000 (14:34 +0900)]
define NODE_STATUS macro

7 years agoremove Node* cast in NODE_BODY macro
K.Kosako [Thu, 8 Jun 2017 05:25:18 +0000 (14:25 +0900)]
remove Node* cast in NODE_BODY macro

7 years agoremove NodeBase from subclassof Node
K.Kosako [Thu, 8 Jun 2017 04:55:46 +0000 (13:55 +0900)]
remove NodeBase from subclassof Node

7 years agorename NTYPE to NODE_TYPE
K.Kosako [Thu, 8 Jun 2017 04:38:41 +0000 (13:38 +0900)]
rename NTYPE to NODE_TYPE

7 years agorename NodeBase#type to NodeBase#node_type
K.Kosako [Thu, 8 Jun 2017 04:35:15 +0000 (13:35 +0900)]
rename NodeBase#type to NodeBase#node_type

7 years agorename target_empty_info to body_empty_info
K.Kosako [Thu, 8 Jun 2017 04:24:35 +0000 (13:24 +0900)]
rename target_empty_info to body_empty_info

7 years agorename NQ_TARGET_ to NQ_BODY_
K.Kosako [Thu, 8 Jun 2017 04:21:24 +0000 (13:21 +0900)]
rename NQ_TARGET_ to NQ_BODY_

7 years agomove target member in AnchorNode to NodeBase#body
K.Kosako [Thu, 8 Jun 2017 04:18:21 +0000 (13:18 +0900)]
move target member in AnchorNode to NodeBase#body

7 years agomove target member in CallNode to NodeBase#body
K.Kosako [Thu, 8 Jun 2017 02:13:04 +0000 (11:13 +0900)]
move target member in CallNode to NodeBase#body

7 years agomove target member in EncloseNode into NodeBase#body
K.Kosako [Wed, 7 Jun 2017 08:59:50 +0000 (17:59 +0900)]
move target member in EncloseNode into NodeBase#body

7 years agomove target in QtfrNode into NodeBase#body
K.Kosako [Wed, 7 Jun 2017 08:32:37 +0000 (17:32 +0900)]
move target in QtfrNode into NodeBase#body

7 years agomove state members into NodeBase#status
K.Kosako [Wed, 7 Jun 2017 07:26:30 +0000 (16:26 +0900)]
move state members into NodeBase#status

7 years agodisable int_stack
K.Kosako [Wed, 7 Jun 2017 05:22:02 +0000 (14:22 +0900)]
disable int_stack

7 years agofix indent
K.Kosako [Wed, 7 Jun 2017 05:20:18 +0000 (14:20 +0900)]
fix indent

7 years agorecursive enclose-memory in repeat should be compiled to mem-end-push-rec
K.Kosako [Wed, 7 Jun 2017 05:17:13 +0000 (14:17 +0900)]
recursive enclose-memory in repeat should be compiled to mem-end-push-rec

7 years agoadd int_stack
K.Kosako [Tue, 6 Jun 2017 06:52:51 +0000 (15:52 +0900)]
add int_stack

7 years agorename and change type from scanenv->mem_nodes to mem_env
K.Kosako [Tue, 6 Jun 2017 05:57:33 +0000 (14:57 +0900)]
rename and change type from scanenv->mem_nodes to mem_env

7 years agofix invalid using of macro
K.Kosako [Tue, 6 Jun 2017 04:26:51 +0000 (13:26 +0900)]
fix invalid using of macro

7 years agodefine SET_ENCLOSE_RECURSION()
K.Kosako [Tue, 6 Jun 2017 04:23:07 +0000 (13:23 +0900)]
define SET_ENCLOSE_RECURSION()

7 years agostate check needed in quantifiers_memory_node_info()
K.Kosako [Mon, 5 Jun 2017 08:50:37 +0000 (17:50 +0900)]
state check needed in quantifiers_memory_node_info()

7 years agoaddd output of stack size in ONIG_DEBUG_MATCH
K.Kosako [Fri, 2 Jun 2017 06:00:14 +0000 (15:00 +0900)]
addd output of stack size in ONIG_DEBUG_MATCH

7 years agoadd output of bt_mem_start and bt_mem_end in ONIG_DEBUG_COMPILE
K.Kosako [Fri, 2 Jun 2017 04:43:10 +0000 (13:43 +0900)]
add output of bt_mem_start and bt_mem_end in ONIG_DEBUG_COMPILE

7 years agoadd output of bytecode execution counter
K.Kosako [Fri, 2 Jun 2017 01:57:10 +0000 (10:57 +0900)]
add output of bytecode execution counter

7 years agooutput bytecode adress in ONIG_DEBUG_MATCH
K.Kosako [Thu, 1 Jun 2017 08:31:26 +0000 (17:31 +0900)]
output bytecode adress in ONIG_DEBUG_MATCH

7 years agoescape warnings for ONIG_DEBUG_MATCH
K.Kosako [Thu, 1 Jun 2017 08:25:26 +0000 (17:25 +0900)]
escape warnings for ONIG_DEBUG_MATCH

7 years agochange output format of address in bytecode
K.Kosako [Thu, 1 Jun 2017 05:00:06 +0000 (14:00 +0900)]
change output format of address in bytecode

7 years agominor changes of bytecode output format
K.Kosako [Thu, 1 Jun 2017 04:38:27 +0000 (13:38 +0900)]
minor changes of bytecode output format

7 years agooutput address in print_compiled_byte_code_list()
K.Kosako [Thu, 1 Jun 2017 04:26:00 +0000 (13:26 +0900)]
output address in print_compiled_byte_code_list()

7 years agoescape warning for ONIG_DEBUG_COMPILE
K.Kosako [Thu, 1 Jun 2017 04:16:09 +0000 (13:16 +0900)]
escape warning for ONIG_DEBUG_COMPILE

7 years agoInvalidate PR #43 partially for Issue #61
K.Kosako [Wed, 31 May 2017 09:01:53 +0000 (18:01 +0900)]
Invalidate PR #43 partially for Issue #61

7 years agoupdate README.md
K.Kosako [Fri, 26 May 2017 06:03:04 +0000 (15:03 +0900)]
update README.md

7 years agosetup 6.3.0
K.Kosako [Fri, 26 May 2017 05:59:18 +0000 (14:59 +0900)]
setup 6.3.0

7 years agoupdate HISTORY
K.Kosako [Fri, 26 May 2017 05:51:20 +0000 (14:51 +0900)]
update HISTORY

7 years agorefactoring
K.Kosako [Wed, 24 May 2017 05:19:43 +0000 (14:19 +0900)]
refactoring

7 years agofix indent
K.Kosako [Wed, 24 May 2017 04:53:15 +0000 (13:53 +0900)]
fix indent

7 years agofix #60 : invalid state(CCS_VALUE) in parse_char_class()
K.Kosako [Wed, 24 May 2017 04:43:25 +0000 (13:43 +0900)]
fix #60 : invalid state(CCS_VALUE) in parse_char_class()

7 years agofix #59 : access to invalid address by reg->dmax value
K.Kosako [Wed, 24 May 2017 01:27:04 +0000 (10:27 +0900)]
fix #59 : access to invalid address by reg->dmax value

7 years agofix invalid increment of start position in onig_scan()
K.Kosako [Tue, 23 May 2017 08:07:04 +0000 (17:07 +0900)]
fix invalid increment of start position in onig_scan()

7 years agofix indent
K.Kosako [Tue, 23 May 2017 07:50:00 +0000 (16:50 +0900)]
fix indent

7 years agofix indent
K.Kosako [Tue, 23 May 2017 07:39:02 +0000 (16:39 +0900)]
fix indent

7 years agofix #58 : access to invalid address by reg->dmin value
K.Kosako [Tue, 23 May 2017 07:15:35 +0000 (16:15 +0900)]
fix #58 : access to invalid address by reg->dmin value

7 years agofix #57 : DATA_ENSURE() check must be before data access
K.Kosako [Tue, 23 May 2017 01:28:58 +0000 (10:28 +0900)]
fix #57 : DATA_ENSURE() check must be before data access

7 years agofix #56 : return invalid result for codepoint 0xFFFFFFFF
K.Kosako [Mon, 22 May 2017 09:09:39 +0000 (18:09 +0900)]
fix #56 : return invalid result for codepoint 0xFFFFFFFF

7 years agoupdate gperf to 3.0.4
K.Kosako [Mon, 22 May 2017 08:57:52 +0000 (17:57 +0900)]
update gperf to 3.0.4

7 years agoadd test case for escape-o-brace syntax
K.Kosako [Sun, 21 May 2017 02:41:00 +0000 (11:41 +0900)]
add test case for escape-o-brace syntax

7 years agofix invalid mask value for ONIG_SYN_OP_ESC_O_BRACE_OCTAL
K.Kosako [Fri, 19 May 2017 12:00:53 +0000 (21:00 +0900)]
fix invalid mask value for ONIG_SYN_OP_ESC_O_BRACE_OCTAL

7 years agoadd escape-o-brace syntax description
K.Kosako [Fri, 19 May 2017 09:03:03 +0000 (18:03 +0900)]
add escape-o-brace syntax description

7 years agoadd escape-o-brace syntax for wide char expressed in octal
K.Kosako [Fri, 19 May 2017 09:02:37 +0000 (18:02 +0900)]
add escape-o-brace syntax for wide char expressed in octal

7 years agodefine ONIG_SYN_OP_ESC_O_BRACE_OCTAL
K.Kosako [Fri, 19 May 2017 09:00:53 +0000 (18:00 +0900)]
define ONIG_SYN_OP_ESC_O_BRACE_OCTAL

7 years agofix indent
K.Kosako [Fri, 19 May 2017 08:23:18 +0000 (17:23 +0900)]
fix indent

7 years agofix #55 : Byte value expressed in octal must be smaller than 256
K.Kosako [Fri, 19 May 2017 06:44:47 +0000 (15:44 +0900)]
fix #55 : Byte value expressed in octal must be smaller than 256

7 years agofix #55 : check too big code point value for single byte value in next_state_val()
K.Kosako [Thu, 18 May 2017 08:05:27 +0000 (17:05 +0900)]
fix #55 : check too big code point value for single byte value in next_state_val()

7 years agosetup 6.2.0
K.Kosako [Thu, 6 Apr 2017 08:05:42 +0000 (17:05 +0900)]
setup 6.2.0

7 years agoupdate HISTORY
K.Kosako [Thu, 6 Apr 2017 07:57:55 +0000 (16:57 +0900)]
update HISTORY

7 years agoPR #51 and small fix
K.Kosako [Wed, 15 Mar 2017 04:17:56 +0000 (13:17 +0900)]
PR #51 and small fix

7 years agoInitialize return value (https://bugs.ruby-lang.org/issues/13234)
K.Kosako [Tue, 21 Feb 2017 01:34:15 +0000 (10:34 +0900)]
Initialize return value (https://bugs.ruby-lang.org/issues/13234)

7 years agoadd onig_set_capture_num_limit()
K.Kosako [Tue, 3 Jan 2017 12:38:35 +0000 (21:38 +0900)]
add onig_set_capture_num_limit()

7 years agochange MemNumType from short int to int
K.Kosako [Tue, 3 Jan 2017 12:25:28 +0000 (21:25 +0900)]
change MemNumType from short int to int

7 years agofix for #34
kosako [Mon, 19 Dec 2016 04:48:40 +0000 (13:48 +0900)]
fix for #34

7 years agoadd test for PR#43
kosako [Mon, 19 Dec 2016 04:40:11 +0000 (13:40 +0900)]
add test for PR#43

7 years agoadd test for PR#42
kosako [Mon, 19 Dec 2016 04:33:38 +0000 (13:33 +0900)]
add test for PR#42

7 years agoadd test for PR#44
kosako [Fri, 16 Dec 2016 08:45:46 +0000 (17:45 +0900)]
add test for PR#44

7 years agoMerge pull request #44 from k-takata/fix-cclass-hyphen
K.Kosako [Thu, 15 Dec 2016 09:11:58 +0000 (18:11 +0900)]
Merge pull request #44 from k-takata/fix-cclass-hyphen

[0-9-a] was not allowed as [0-9\-a]

7 years agoMerge pull request #43 from k-takata/fix-recursive-capture
K.Kosako [Thu, 15 Dec 2016 08:52:28 +0000 (17:52 +0900)]
Merge pull request #43 from k-takata/fix-recursive-capture

Fix illegal capture after recursive call

7 years agoMerge pull request #42 from k-takata/fix-z-optimization
K.Kosako [Wed, 14 Dec 2016 08:37:02 +0000 (17:37 +0900)]
Merge pull request #42 from k-takata/fix-z-optimization

fix problem with optimization of \z

7 years agoMerge pull request #41 from k-takata/fix-anychar-star-optimization
K.Kosako [Wed, 14 Dec 2016 08:27:12 +0000 (17:27 +0900)]
Merge pull request #41 from k-takata/fix-anychar-star-optimization

Fix .* optimization

7 years ago[0-9-a] was not allowed as [0-9\-a]
K.Takata [Tue, 13 Dec 2016 13:26:22 +0000 (22:26 +0900)]
[0-9-a] was not allowed as [0-9\-a]

This was originally fixed by Ruby r37175.

7 years agoFix illegal capture after recursive call
K.Takata [Tue, 13 Dec 2016 13:19:53 +0000 (22:19 +0900)]
Fix illegal capture after recursive call

After matching `/(\(((?:[^(]|\g<1>)*)\))/ =~ "(abc)(abc)"`,
`\2` captures wrong position.
A capture group inside another capture group should be also handled as
if it is called, when the outer group is called.

7 years agoMerge pull request #40 from k-takata/fix-stackoverflow
K.Kosako [Tue, 13 Dec 2016 08:05:17 +0000 (17:05 +0900)]
Merge pull request #40 from k-takata/fix-stackoverflow

Deeply nested capture groups cause stack overflow

7 years agoMerge pull request #39 from k-takata/fix-utf-16
K.Kosako [Tue, 13 Dec 2016 07:31:09 +0000 (16:31 +0900)]
Merge pull request #39 from k-takata/fix-utf-16

Fix UTF-16/32 problems

7 years agofix problem with optimization of \z
K.Takata [Wed, 10 Apr 2013 11:16:34 +0000 (20:16 +0900)]
fix problem with optimization of \z

"こんにちは" =~ /\n?\z/ didn't match.

see:
  http://bugs.ruby-lang.org/issues/8210
  http://stackoverflow.com/a/15885857/925913

7 years agoFix .* optimization
K.Takata [Mon, 12 Dec 2016 15:37:21 +0000 (00:37 +0900)]
Fix .* optimization

Fix following patterns:
* /(?<=a).*b/ =~ 'aab'
* /(?!a).*b/ =~ 'ab'

Ported from Onigmo.

7 years agoSet a limit of parser recursion
K.Takata [Mon, 28 Nov 2016 14:16:12 +0000 (23:16 +0900)]
Set a limit of parser recursion

Our parser uses recursion, so it causes stack overflow when parsing
deeply nested capture groups. E.g.:

  x2("(" * 32767 + "a" + ")" * 32767, "a", 0, 1)

Set a limit for this.
The default value is defined in regint.h:
* DEFAULT_PARSE_DEPTH_LIMIT (Currently 4096)

Also add two APIs to support this:
* onig_get_parse_depth_limit
* onig_set_parse_depth_limit

7 years agoFix that warnings are not shown properly
K.Takata [Tue, 1 Nov 2016 13:45:49 +0000 (22:45 +0900)]
Fix that warnings are not shown properly

When encoding is UTF-16LE/32LE, warning message with '/' or '\\' are not
shown properly.

7 years ago/[a-c#]+\W/ =~ "def#" fails when encoding is UTF-16/32
K.Takata [Tue, 15 Jul 2014 13:52:34 +0000 (22:52 +0900)]
/[a-c#]+\W/ =~ "def#" fails when encoding is UTF-16/32

7 years ago/[\x{0}-X]/i doesn't match properly when UTF-16/32 is used.
K.Takata [Wed, 16 Nov 2011 18:36:22 +0000 (03:36 +0900)]
/[\x{0}-X]/i doesn't match properly when UTF-16/32 is used.

This bug occurs when a code range already includes \x{0} and adding
a new code range to it. We must also care about 0xffffffff.

7 years agosetup 6.1.3 v6.1.3
K.Kosako [Sun, 11 Dec 2016 04:18:17 +0000 (13:18 +0900)]
setup 6.1.3

7 years agoupdate HISTORY
K.Kosako [Sun, 11 Dec 2016 04:12:29 +0000 (13:12 +0900)]
update HISTORY

7 years agofix: Syntax error: redirection unexpected (expecting word) #35
K.Kosako [Sat, 10 Dec 2016 08:00:04 +0000 (17:00 +0900)]
fix: Syntax error: redirection unexpected (expecting word) #35

7 years agocheck return values for alloc() and Calloc()
kosako [Thu, 17 Nov 2016 05:04:11 +0000 (14:04 +0900)]
check return values for alloc() and Calloc()

7 years agoadd an entry into .gitignore
kosako [Tue, 15 Nov 2016 04:34:36 +0000 (13:34 +0900)]
add an entry into .gitignore

7 years agocheck return value for fprintf() and fputs() #34
kosako [Tue, 15 Nov 2016 04:33:46 +0000 (13:33 +0900)]
check return value for fprintf() and fputs() #34

7 years agoguard __USE_ISOC99
kosako [Tue, 15 Nov 2016 04:26:59 +0000 (13:26 +0900)]
guard __USE_ISOC99

7 years agocheck return value for fopen() #34
kosako [Tue, 15 Nov 2016 04:21:40 +0000 (13:21 +0900)]
check return value for fopen() #34

7 years agomerge from develop v6.1.2
kosako [Mon, 7 Nov 2016 01:41:55 +0000 (10:41 +0900)]
merge from develop

7 years agoupdate README.md
kosako [Mon, 7 Nov 2016 01:33:25 +0000 (10:33 +0900)]
update README.md

7 years agosetup 6.1.2
kosako [Thu, 3 Nov 2016 11:59:01 +0000 (20:59 +0900)]
setup 6.1.2

7 years agoupdate HISTORY
kosako [Thu, 3 Nov 2016 11:53:50 +0000 (20:53 +0900)]
update HISTORY

7 years agoallow word bound, word begin and word end in look-behind
kosako [Tue, 25 Oct 2016 06:37:28 +0000 (15:37 +0900)]
allow word bound, word begin and word end in look-behind