mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Merge Onigmo 6.1.1
* 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
This commit is contained in:
parent
238b9276de
commit
6b1c6e0e55
8 changed files with 227 additions and 90 deletions
15
regint.h
15
regint.h
|
@ -202,7 +202,9 @@
|
|||
#define xmemcpy memcpy
|
||||
#define xmemmove memmove
|
||||
|
||||
#if defined(RUBY_MSVCRT_VERSION) && RUBY_MSVCRT_VERSION >= 90 && !defined(__GNUC__)
|
||||
#if ((defined(RUBY_MSVCRT_VERSION) && RUBY_MSVCRT_VERSION >= 90) \
|
||||
|| (!defined(RUBY_MSVCRT_VERSION) && defined(_WIN32))) \
|
||||
&& !defined(__GNUC__)
|
||||
# define xalloca _alloca
|
||||
# define xvsnprintf(buf,size,fmt,args) _vsnprintf_s(buf,size,_TRUNCATE,fmt,args)
|
||||
# define xsnprintf sprintf_s
|
||||
|
@ -598,7 +600,6 @@ enum OpCode {
|
|||
OP_END_LINE,
|
||||
OP_SEMI_END_BUF,
|
||||
OP_BEGIN_POSITION,
|
||||
OP_BEGIN_POS_OR_LINE, /* used for implicit anchor optimization */
|
||||
|
||||
OP_BACKREF1,
|
||||
OP_BACKREF2,
|
||||
|
@ -643,6 +644,9 @@ enum OpCode {
|
|||
OP_LOOK_BEHIND, /* (?<=...) start (no needs end opcode) */
|
||||
OP_PUSH_LOOK_BEHIND_NOT, /* (?<!...) start */
|
||||
OP_FAIL_LOOK_BEHIND_NOT, /* (?<!...) end */
|
||||
OP_PUSH_ABSENT_POS, /* (?~...) start */
|
||||
OP_ABSENT, /* (?~...) start of inner loop */
|
||||
OP_ABSENT_END, /* (?~...) end */
|
||||
|
||||
OP_CALL, /* \g<name> */
|
||||
OP_RETURN,
|
||||
|
@ -730,6 +734,9 @@ typedef void* PointerType;
|
|||
#define SIZE_OP_CALL (SIZE_OPCODE + SIZE_ABSADDR)
|
||||
#define SIZE_OP_RETURN SIZE_OPCODE
|
||||
#define SIZE_OP_CONDITION (SIZE_OPCODE + SIZE_MEMNUM + SIZE_RELADDR)
|
||||
#define SIZE_OP_PUSH_ABSENT_POS SIZE_OPCODE
|
||||
#define SIZE_OP_ABSENT (SIZE_OPCODE + SIZE_RELADDR)
|
||||
#define SIZE_OP_ABSENT_END SIZE_OPCODE
|
||||
|
||||
#ifdef USE_COMBINATION_EXPLOSION_CHECK
|
||||
# define SIZE_OP_STATE_CHECK (SIZE_OPCODE + SIZE_STATE_CHECK_NUM)
|
||||
|
@ -841,6 +848,10 @@ typedef struct _OnigStackType {
|
|||
UChar *pstr; /* string position */
|
||||
} call_frame;
|
||||
#endif
|
||||
struct {
|
||||
UChar *abs_pstr; /* absent start position */
|
||||
const UChar *end_pstr; /* end position */
|
||||
} absent_pos;
|
||||
} u;
|
||||
} OnigStackType;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue