Back to index

php5  5.3.10
Classes | Defines | Typedefs | Enumerations | Functions
regint.h File Reference
#include "ruby.h"
#include "rubysig.h"
#include <strings.h>
#include <ctype.h>
#include "regenc.h"
#include "oniguruma.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _BBuf
struct  CClassNode

Defines

#define USE_NAMED_GROUP
#define USE_SUBEXP_CALL
#define USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK   /* /(?:()|())*\2/ */
#define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE   /* /\n$/ =~ "\n" */
#define USE_WARNING_REDUNDANT_NESTED_REPEAT_OPERATOR
#define USE_RECYCLE_NODE
#define USE_OP_PUSH_OR_JUMP_EXACT
#define USE_QUANTIFIER_PEEK_NEXT
#define USE_ST_HASH_TABLE
#define USE_SHARED_CCLASS_TABLE
#define INIT_MATCH_STACK_SIZE   160
#define DEFAULT_MATCH_STACK_LIMIT_SIZE   0 /* unlimited */
#define USE_COMBINATION_EXPLOSION_CHECK   /* (X*)* */
#define USE_MULTI_THREAD_SYSTEM
#define THREAD_SYSTEM_INIT
#define THREAD_SYSTEM_END
#define THREAD_ATOMIC_START   DEFER_INTS
#define THREAD_ATOMIC_END   ENABLE_INTS
#define THREAD_PASS   rb_thread_schedule()
#define DEFAULT_WARN_FUNCTION   onig_rb_warn
#define DEFAULT_VERB_WARN_FUNCTION   onig_rb_warning
#define STATE_CHECK_STRING_THRESHOLD_LEN   7
#define STATE_CHECK_BUFF_MAX_SIZE   0x4000
#define THREAD_PASS_LIMIT_COUNT   8
#define xmemset   memset
#define xmemcpy   memcpy
#define xmemmove   memmove
#define xalloca   alloca
#define ONIG_STATE_INC(reg)   /* Nothing */
#define ONIG_STATE_DEC(reg)   /* Nothing */
#define ONIG_STATE_INC_THREAD(reg)   /* Nothing */
#define ONIG_STATE_DEC_THREAD(reg)   /* Nothing */
#define onig_st_is_member   st_is_member
#define onig_st_init_table   st_init_table
#define onig_st_init_table_with_size   st_init_table_with_size
#define onig_st_init_numtable   st_init_numtable
#define onig_st_init_numtable_with_size   st_init_numtable_with_size
#define onig_st_init_strtable   st_init_strtable
#define onig_st_init_strtable_with_size   st_init_strtable_with_size
#define onig_st_init_strend_table_with_size   st_init_strend_table_with_size
#define onig_st_delete   st_delete
#define onig_st_delete_safe   st_delete_safe
#define onig_st_insert   st_insert
#define onig_st_insert_strend   st_insert_strend
#define onig_st_lookup   st_lookup
#define onig_st_lookup_strend   st_lookup_strend
#define onig_st_foreach   st_foreach
#define onig_st_add_direct   st_add_direct
#define onig_st_add_direct_strend   st_add_direct_strend
#define onig_st_free_table   st_free_table
#define onig_st_cleanup_safe   st_cleanup_safe
#define onig_st_copy   st_copy
#define onig_st_nothing_key_clone   st_nothing_key_clone
#define onig_st_nothing_key_free   st_nothing_key_free
#define MIN(a, b)   (((a)>(b))?(b):(a))
#define MAX(a, b)   (((a)<(b))?(b):(a))
#define IS_NULL(p)   (((void*)(p)) == (void*)0)
#define IS_NOT_NULL(p)   (((void*)(p)) != (void*)0)
#define CHECK_NULL_RETURN(p)   if (IS_NULL(p)) return NULL
#define CHECK_NULL_RETURN_VAL(p, val)   if (IS_NULL(p)) return (val)
#define NULL_UCHARP   ((UChar* )0)
#define WORD_ALIGNMENT_SIZE   SIZEOF_LONG
#define GET_ALIGNMENT_PAD_SIZE(addr, pad_size)
#define ALIGNMENT_RIGHT(addr)
#define B_SHIFT   8
#define B_MASK   0xff
#define SERIALIZE_2BYTE_INT(i, p)
#define SERIALIZE_4BYTE_INT(i, p)
#define SERIALIZE_8BYTE_INT(i, p)
#define GET_2BYTE_INT_INC(type, i, p)
#define GET_4BYTE_INT_INC(type, i, p)
#define GET_8BYTE_INT_INC(type, i, p)
#define STACK_POP_LEVEL_FREE   0
#define STACK_POP_LEVEL_MEM_START   1
#define STACK_POP_LEVEL_ALL   2
#define ONIG_OPTIMIZE_NONE   0
#define ONIG_OPTIMIZE_EXACT   1 /* Slow Search */
#define ONIG_OPTIMIZE_EXACT_BM   2 /* Boyer Moore Search */
#define ONIG_OPTIMIZE_EXACT_BM_NOT_REV   3 /* BM (but not simple match) */
#define ONIG_OPTIMIZE_EXACT_IC   4 /* Slow Search (ignore case) */
#define ONIG_OPTIMIZE_MAP   5 /* char map */
#define BIT_STATUS_BITS_NUM   (sizeof(BitStatusType) * 8)
#define BIT_STATUS_CLEAR(stats)   (stats) = 0
#define BIT_STATUS_ON_ALL(stats)   (stats) = ~((BitStatusType )0)
#define BIT_STATUS_AT(stats, n)   ((n) < BIT_STATUS_BITS_NUM ? ((stats) & (1 << n)) : ((stats) & 1))
#define BIT_STATUS_ON_AT(stats, n)
#define BIT_STATUS_ON_AT_SIMPLE(stats, n)
#define INT_MAX_LIMIT   ((1UL << (SIZEOF_INT * 8 - 1)) - 1)
#define DIGITVAL(code)   ((code) - '0')
#define ODIGITVAL(code)   DIGITVAL(code)
#define XDIGITVAL(enc, code)
#define IS_SINGLELINE(option)   ((option) & ONIG_OPTION_SINGLELINE)
#define IS_MULTILINE(option)   ((option) & ONIG_OPTION_MULTILINE)
#define IS_IGNORECASE(option)   ((option) & ONIG_OPTION_IGNORECASE)
#define IS_EXTEND(option)   ((option) & ONIG_OPTION_EXTEND)
#define IS_FIND_LONGEST(option)   ((option) & ONIG_OPTION_FIND_LONGEST)
#define IS_FIND_NOT_EMPTY(option)   ((option) & ONIG_OPTION_FIND_NOT_EMPTY)
#define IS_POSIXLINE(option)   (IS_SINGLELINE(option) && IS_MULTILINE(option))
#define IS_FIND_CONDITION(option)
#define IS_NOTBOL(option)   ((option) & ONIG_OPTION_NOTBOL)
#define IS_NOTEOL(option)   ((option) & ONIG_OPTION_NOTEOL)
#define IS_POSIX_REGION(option)   ((option) & ONIG_OPTION_POSIX_REGION)
#define IS_DYNAMIC_OPTION(option)   0
#define REPEAT_INFINITE   -1
#define IS_REPEAT_INFINITE(n)   ((n) == REPEAT_INFINITE)
#define BITS_PER_BYTE   8
#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)
#define BITS_IN_ROOM   (sizeof(Bits) * BITS_PER_BYTE)
#define BITSET_SIZE   (SINGLE_BYTE_SIZE / BITS_IN_ROOM)
#define SIZE_BITSET   sizeof(BitSet)
#define BITSET_CLEAR(bs)
#define BS_ROOM(bs, pos)   (bs)[pos / BITS_IN_ROOM]
#define BS_BIT(pos)   (1 << (pos % BITS_IN_ROOM))
#define BITSET_AT(bs, pos)   (BS_ROOM(bs,pos) & BS_BIT(pos))
#define BITSET_SET_BIT(bs, pos)   BS_ROOM(bs,pos) |= BS_BIT(pos)
#define BITSET_CLEAR_BIT(bs, pos)   BS_ROOM(bs,pos) &= ~(BS_BIT(pos))
#define BITSET_INVERT_BIT(bs, pos)   BS_ROOM(bs,pos) ^= BS_BIT(pos)
#define BBUF_INIT(buf, size)   onig_bbuf_init((BBuf* )(buf), (size))
#define BBUF_SIZE_INC(buf, inc)
#define BBUF_EXPAND(buf, low)
#define BBUF_ENSURE_SIZE(buf, size)
#define BBUF_WRITE(buf, pos, bytes, n)
#define BBUF_WRITE1(buf, pos, byte)
#define BBUF_ADD(buf, bytes, n)   BBUF_WRITE((buf),(buf)->used,(bytes),(n))
#define BBUF_ADD1(buf, byte)   BBUF_WRITE1((buf),(buf)->used,(byte))
#define BBUF_GET_ADD_ADDRESS(buf)   ((buf)->p + (buf)->used)
#define BBUF_GET_OFFSET_POS(buf)   ((buf)->used)
#define BBUF_MOVE_RIGHT(buf, from, to, n)
#define BBUF_MOVE_LEFT(buf, from, to, n)
#define BBUF_MOVE_LEFT_REDUCE(buf, from, to)
#define BBUF_INSERT(buf, pos, bytes, n)
#define BBUF_GET_BYTE(buf, pos)   (buf)->p[(pos)]
#define ANCHOR_BEGIN_BUF   (1<<0)
#define ANCHOR_BEGIN_LINE   (1<<1)
#define ANCHOR_BEGIN_POSITION   (1<<2)
#define ANCHOR_END_BUF   (1<<3)
#define ANCHOR_SEMI_END_BUF   (1<<4)
#define ANCHOR_END_LINE   (1<<5)
#define ANCHOR_WORD_BOUND   (1<<6)
#define ANCHOR_NOT_WORD_BOUND   (1<<7)
#define ANCHOR_WORD_BEGIN   (1<<8)
#define ANCHOR_WORD_END   (1<<9)
#define ANCHOR_PREC_READ   (1<<10)
#define ANCHOR_PREC_READ_NOT   (1<<11)
#define ANCHOR_LOOK_BEHIND   (1<<12)
#define ANCHOR_LOOK_BEHIND_NOT   (1<<13)
#define ANCHOR_ANYCHAR_STAR   (1<<14) /* ".*" optimize info */
#define ANCHOR_ANYCHAR_STAR_ML   (1<<15) /* ".*" optimize info (multi-line) */
#define SIZE_OPCODE   1
#define SIZE_RELADDR   sizeof(RelAddrType)
#define SIZE_ABSADDR   sizeof(AbsAddrType)
#define SIZE_LENGTH   sizeof(LengthType)
#define SIZE_MEMNUM   sizeof(MemNumType)
#define SIZE_STATE_CHECK_NUM   sizeof(StateCheckNumType)
#define SIZE_REPEATNUM   sizeof(RepeatNumType)
#define SIZE_OPTION   sizeof(OnigOptionType)
#define SIZE_CODE_POINT   sizeof(OnigCodePoint)
#define SIZE_POINTER   sizeof(PointerType)
#define PLATFORM_GET_INC(val, p, type)
#define GET_RELADDR_INC(addr, p)   PLATFORM_GET_INC(addr, p, RelAddrType)
#define GET_ABSADDR_INC(addr, p)   PLATFORM_GET_INC(addr, p, AbsAddrType)
#define GET_LENGTH_INC(len, p)   PLATFORM_GET_INC(len, p, LengthType)
#define GET_MEMNUM_INC(num, p)   PLATFORM_GET_INC(num, p, MemNumType)
#define GET_REPEATNUM_INC(num, p)   PLATFORM_GET_INC(num, p, RepeatNumType)
#define GET_OPTION_INC(option, p)   PLATFORM_GET_INC(option, p, OnigOptionType)
#define GET_POINTER_INC(ptr, p)   PLATFORM_GET_INC(ptr, p, PointerType)
#define GET_STATE_CHECK_NUM_INC(num, p)   PLATFORM_GET_INC(num, p, StateCheckNumType)
#define GET_CODE_POINT(code, p)   code = *((OnigCodePoint* )(p))
#define GET_BYTE_INC(byte, p)
#define SIZE_OP_ANYCHAR_STAR   SIZE_OPCODE
#define SIZE_OP_ANYCHAR_STAR_PEEK_NEXT   (SIZE_OPCODE + 1)
#define SIZE_OP_JUMP   (SIZE_OPCODE + SIZE_RELADDR)
#define SIZE_OP_PUSH   (SIZE_OPCODE + SIZE_RELADDR)
#define SIZE_OP_POP   SIZE_OPCODE
#define SIZE_OP_PUSH_OR_JUMP_EXACT1   (SIZE_OPCODE + SIZE_RELADDR + 1)
#define SIZE_OP_PUSH_IF_PEEK_NEXT   (SIZE_OPCODE + SIZE_RELADDR + 1)
#define SIZE_OP_REPEAT_INC   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_REPEAT_INC_NG   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_PUSH_POS   SIZE_OPCODE
#define SIZE_OP_PUSH_POS_NOT   (SIZE_OPCODE + SIZE_RELADDR)
#define SIZE_OP_POP_POS   SIZE_OPCODE
#define SIZE_OP_FAIL_POS   SIZE_OPCODE
#define SIZE_OP_SET_OPTION   (SIZE_OPCODE + SIZE_OPTION)
#define SIZE_OP_SET_OPTION_PUSH   (SIZE_OPCODE + SIZE_OPTION)
#define SIZE_OP_FAIL   SIZE_OPCODE
#define SIZE_OP_MEMORY_START   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_START_PUSH   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_END_PUSH   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_END_PUSH_REC   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_END   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_MEMORY_END_REC   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_PUSH_STOP_BT   SIZE_OPCODE
#define SIZE_OP_POP_STOP_BT   SIZE_OPCODE
#define SIZE_OP_NULL_CHECK_START   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_NULL_CHECK_END   (SIZE_OPCODE + SIZE_MEMNUM)
#define SIZE_OP_LOOK_BEHIND   (SIZE_OPCODE + SIZE_LENGTH)
#define SIZE_OP_PUSH_LOOK_BEHIND_NOT   (SIZE_OPCODE + SIZE_RELADDR + SIZE_LENGTH)
#define SIZE_OP_FAIL_LOOK_BEHIND_NOT   SIZE_OPCODE
#define SIZE_OP_CALL   (SIZE_OPCODE + SIZE_ABSADDR)
#define SIZE_OP_RETURN   SIZE_OPCODE
#define SIZE_OP_STATE_CHECK   (SIZE_OPCODE + SIZE_STATE_CHECK_NUM)
#define SIZE_OP_STATE_CHECK_PUSH   (SIZE_OPCODE + SIZE_STATE_CHECK_NUM + SIZE_RELADDR)
#define SIZE_OP_STATE_CHECK_PUSH_OR_JUMP   (SIZE_OPCODE + SIZE_STATE_CHECK_NUM + SIZE_RELADDR)
#define SIZE_OP_STATE_CHECK_ANYCHAR_STAR   (SIZE_OPCODE + SIZE_STATE_CHECK_NUM)
#define MC_ESC(enc)   (enc)->meta_char_table.esc
#define MC_ANYCHAR(enc)   (enc)->meta_char_table.anychar
#define MC_ANYTIME(enc)   (enc)->meta_char_table.anytime
#define MC_ZERO_OR_ONE_TIME(enc)   (enc)->meta_char_table.zero_or_one_time
#define MC_ONE_OR_MORE_TIME(enc)   (enc)->meta_char_table.one_or_more_time
#define MC_ANYCHAR_ANYTIME(enc)   (enc)->meta_char_table.anychar_anytime
#define IS_MC_ESC_CODE(code, enc, syn)
#define SYN_POSIX_COMMON_OP
#define SYN_GNU_REGEX_OP
#define SYN_GNU_REGEX_BV
#define FLAG_CCLASS_NOT   1
#define FLAG_CCLASS_SHARE   (1<<1)
#define CCLASS_SET_NOT(cc)   (cc)->flags |= FLAG_CCLASS_NOT
#define CCLASS_CLEAR_NOT(cc)   (cc)->flags &= ~FLAG_CCLASS_NOT
#define CCLASS_SET_SHARE(cc)   (cc)->flags |= FLAG_CCLASS_SHARE
#define IS_CCLASS_NOT(cc)   (((cc)->flags & FLAG_CCLASS_NOT) != 0)
#define IS_CCLASS_SHARE(cc)   (((cc)->flags & FLAG_CCLASS_SHARE) != 0)

Typedefs

typedef unsigned int BitStatusType
typedef unsigned char Bits
typedef Bits BitSet [BITSET_SIZE]
typedef BitsBitSetRef
typedef struct _BBuf BBuf
typedef int RelAddrType
typedef int AbsAddrType
typedef int LengthType
typedef int RepeatNumType
typedef short int MemNumType
typedef short int StateCheckNumType
typedef void * PointerType

Enumerations

enum  OpCode {
  OP_FINISH = 0, OP_END = 1, OP_EXACT1 = 2, OP_EXACT2,
  OP_EXACT3, OP_EXACT4, OP_EXACT5, OP_EXACTN,
  OP_EXACTMB2N1, OP_EXACTMB2N2, OP_EXACTMB2N3, OP_EXACTMB2N,
  OP_EXACTMB3N, OP_EXACTMBN, OP_EXACT1_IC, OP_EXACTN_IC,
  OP_CCLASS, OP_CCLASS_MB, OP_CCLASS_MIX, OP_CCLASS_NOT,
  OP_CCLASS_MB_NOT, OP_CCLASS_MIX_NOT, OP_CCLASS_NODE, OP_ANYCHAR,
  OP_ANYCHAR_ML, OP_ANYCHAR_STAR, OP_ANYCHAR_ML_STAR, OP_ANYCHAR_STAR_PEEK_NEXT,
  OP_ANYCHAR_ML_STAR_PEEK_NEXT, OP_WORD, OP_NOT_WORD, OP_WORD_BOUND,
  OP_NOT_WORD_BOUND, OP_WORD_BEGIN, OP_WORD_END, OP_BEGIN_BUF,
  OP_END_BUF, OP_BEGIN_LINE, OP_END_LINE, OP_SEMI_END_BUF,
  OP_BEGIN_POSITION, OP_BACKREF1, OP_BACKREF2, OP_BACKREFN,
  OP_BACKREFN_IC, OP_BACKREF_MULTI, OP_BACKREF_MULTI_IC, OP_BACKREF_AT_LEVEL,
  OP_MEMORY_START, OP_MEMORY_START_PUSH, OP_MEMORY_END_PUSH, OP_MEMORY_END_PUSH_REC,
  OP_MEMORY_END, OP_MEMORY_END_REC, OP_SET_OPTION_PUSH, OP_SET_OPTION,
  OP_FAIL, OP_JUMP, OP_PUSH, OP_POP,
  OP_PUSH_OR_JUMP_EXACT1, OP_PUSH_IF_PEEK_NEXT, OP_REPEAT, OP_REPEAT_NG,
  OP_REPEAT_INC, OP_REPEAT_INC_NG, OP_REPEAT_INC_SG, OP_REPEAT_INC_NG_SG,
  OP_NULL_CHECK_START, OP_NULL_CHECK_END, OP_NULL_CHECK_END_MEMST, OP_NULL_CHECK_END_MEMST_PUSH,
  OP_PUSH_POS, OP_POP_POS, OP_PUSH_POS_NOT, OP_FAIL_POS,
  OP_PUSH_STOP_BT, OP_POP_STOP_BT, OP_LOOK_BEHIND, OP_PUSH_LOOK_BEHIND_NOT,
  OP_FAIL_LOOK_BEHIND_NOT, OP_CALL, OP_RETURN, OP_STATE_CHECK_PUSH,
  OP_STATE_CHECK_PUSH_OR_JUMP, OP_STATE_CHECK, OP_STATE_CHECK_ANYCHAR_STAR, OP_STATE_CHECK_ANYCHAR_ML_STAR
}

Functions

UChar *onig_error_code_to_format P_ ((int code))
void onig_snprintf_with_pattern PV_ ((UChar buf[], int bufsize, OnigEncoding enc, UChar *pat, UChar *pat_end, const UChar *fmt,...))
int onig_bbuf_init P_ ((BBuf *buf, int size))
int onig_alloc_init P_ ((regex_t **reg, OnigOptionType option, OnigAmbigType ambig_flag, OnigEncoding enc, OnigSyntaxType *syntax))
int onig_compile P_ ((regex_t *reg, const UChar *pattern, const UChar *pattern_end, OnigErrorInfo *einfo))
void onig_chain_reduce P_ ((regex_t *reg))
void onig_chain_link_add P_ ((regex_t *to, regex_t *add))
void onig_transfer P_ ((regex_t *to, regex_t *from))
int onig_is_code_in_cc P_ ((OnigEncoding enc, OnigCodePoint code, CClassNode *cc))

Class Documentation

struct _BBuf

Definition at line 451 of file regint.h.

Class Members
unsigned int alloc
UChar * p
unsigned int used
struct CClassNode

Definition at line 795 of file regint.h.

Collaboration diagram for CClassNode:
Class Members
BitSet bs
int flags
BBuf * mbuf

Define Documentation

#define ALIGNMENT_RIGHT (   addr)
Value:
do {\
  (addr) += (WORD_ALIGNMENT_SIZE - 1);\
  (addr) -= ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
} while (0)

Definition at line 268 of file regint.h.

#define ANCHOR_ANYCHAR_STAR   (1<<14) /* ".*" optimize info */

Definition at line 547 of file regint.h.

#define ANCHOR_ANYCHAR_STAR_ML   (1<<15) /* ".*" optimize info (multi-line) */

Definition at line 548 of file regint.h.

#define ANCHOR_BEGIN_BUF   (1<<0)

Definition at line 531 of file regint.h.

#define ANCHOR_BEGIN_LINE   (1<<1)

Definition at line 532 of file regint.h.

#define ANCHOR_BEGIN_POSITION   (1<<2)

Definition at line 533 of file regint.h.

#define ANCHOR_END_BUF   (1<<3)

Definition at line 534 of file regint.h.

#define ANCHOR_END_LINE   (1<<5)

Definition at line 536 of file regint.h.

#define ANCHOR_LOOK_BEHIND   (1<<12)

Definition at line 544 of file regint.h.

#define ANCHOR_LOOK_BEHIND_NOT   (1<<13)

Definition at line 545 of file regint.h.

#define ANCHOR_NOT_WORD_BOUND   (1<<7)

Definition at line 539 of file regint.h.

#define ANCHOR_PREC_READ   (1<<10)

Definition at line 542 of file regint.h.

#define ANCHOR_PREC_READ_NOT   (1<<11)

Definition at line 543 of file regint.h.

#define ANCHOR_SEMI_END_BUF   (1<<4)

Definition at line 535 of file regint.h.

#define ANCHOR_WORD_BEGIN   (1<<8)

Definition at line 540 of file regint.h.

#define ANCHOR_WORD_BOUND   (1<<6)

Definition at line 538 of file regint.h.

#define ANCHOR_WORD_END   (1<<9)

Definition at line 541 of file regint.h.

#define B_MASK   0xff

Definition at line 275 of file regint.h.

#define B_SHIFT   8

Definition at line 274 of file regint.h.

#define BBUF_ADD (   buf,
  bytes,
  n 
)    BBUF_WRITE((buf),(buf)->used,(bytes),(n))

Definition at line 495 of file regint.h.

#define BBUF_ADD1 (   buf,
  byte 
)    BBUF_WRITE1((buf),(buf)->used,(byte))

Definition at line 496 of file regint.h.

#define BBUF_ENSURE_SIZE (   buf,
  size 
)
Value:
do{\
  unsigned int new_alloc = (buf)->alloc;\
  while (new_alloc < (unsigned int )(size)) { new_alloc *= 2; }\
  if ((buf)->alloc != new_alloc) {\
    (buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\
    if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
    (buf)->alloc = new_alloc;\
  }\
} while (0)

Definition at line 471 of file regint.h.

#define BBUF_EXPAND (   buf,
  low 
)
Value:
do{\
  do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
  (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
} while (0)

Definition at line 465 of file regint.h.

#define BBUF_GET_ADD_ADDRESS (   buf)    ((buf)->p + (buf)->used)

Definition at line 497 of file regint.h.

#define BBUF_GET_BYTE (   buf,
  pos 
)    (buf)->p[(pos)]

Definition at line 528 of file regint.h.

#define BBUF_GET_OFFSET_POS (   buf)    ((buf)->used)

Definition at line 498 of file regint.h.

#define BBUF_INIT (   buf,
  size 
)    onig_bbuf_init((BBuf* )(buf), (size))

Definition at line 457 of file regint.h.

#define BBUF_INSERT (   buf,
  pos,
  bytes,
  n 
)
Value:
do {\
  if (pos >= (buf)->used) {\
    BBUF_WRITE(buf,pos,bytes,n);\
  }\
  else {\
    BBUF_MOVE_RIGHT((buf),(pos),(pos) + (n),((buf)->used - (pos)));\
    xmemcpy((buf)->p + (pos), (bytes), (n));\
  }\
} while (0)

Definition at line 518 of file regint.h.

#define BBUF_MOVE_LEFT (   buf,
  from,
  to,
  n 
)
Value:
do {\
  xmemmove((buf)->p + (to), (buf)->p + (from), (n));\
} while (0)

Definition at line 508 of file regint.h.

#define BBUF_MOVE_LEFT_REDUCE (   buf,
  from,
  to 
)
Value:
do {\
  xmemmove((buf)->p + (to), (buf)->p + (from), (buf)->used - (from));\
  (buf)->used -= (from - to);\
} while (0)

Definition at line 513 of file regint.h.

#define BBUF_MOVE_RIGHT (   buf,
  from,
  to,
  n 
)
Value:
do {\
  if ((unsigned int )((to)+(n)) > (buf)->alloc) BBUF_EXPAND((buf),(to) + (n));\
  xmemmove((buf)->p + (to), (buf)->p + (from), (n));\
  if ((unsigned int )((to)+(n)) > (buf)->used) (buf)->used = (to) + (n);\
} while (0)

Definition at line 501 of file regint.h.

#define BBUF_SIZE_INC (   buf,
  inc 
)
Value:
do{\
  (buf)->alloc += (inc);\
  (buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
  if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
} while (0)

Definition at line 459 of file regint.h.

#define BBUF_WRITE (   buf,
  pos,
  bytes,
  n 
)
Value:
do{\
  int used = (pos) + (n);\
  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  xmemcpy((buf)->p + (pos), (bytes), (n));\
  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
} while (0)

Definition at line 481 of file regint.h.

#define BBUF_WRITE1 (   buf,
  pos,
  byte 
)
Value:
do{\
  int used = (pos) + 1;\
  if ((buf)->alloc < (unsigned int )used) BBUF_EXPAND((buf),used);\
  (buf)->p[(pos)] = (byte);\
  if ((buf)->used < (unsigned int )used) (buf)->used = used;\
} while (0)

Definition at line 488 of file regint.h.

#define BIT_STATUS_AT (   stats,
  n 
)    ((n) < BIT_STATUS_BITS_NUM ? ((stats) & (1 << n)) : ((stats) & 1))

Definition at line 374 of file regint.h.

#define BIT_STATUS_BITS_NUM   (sizeof(BitStatusType) * 8)

Definition at line 371 of file regint.h.

#define BIT_STATUS_CLEAR (   stats)    (stats) = 0

Definition at line 372 of file regint.h.

#define BIT_STATUS_ON_ALL (   stats)    (stats) = ~((BitStatusType )0)

Definition at line 373 of file regint.h.

#define BIT_STATUS_ON_AT (   stats,
  n 
)
Value:
do {\
  if ((n) < BIT_STATUS_BITS_NUM)\
    (stats) |= (1 << (n));\
  else\
    (stats) |= 1;\
} while (0)

Definition at line 377 of file regint.h.

#define BIT_STATUS_ON_AT_SIMPLE (   stats,
  n 
)
Value:
do {\
  if ((n) < BIT_STATUS_BITS_NUM)\
    (stats) |= (1 << (n));\
} while (0)

Definition at line 384 of file regint.h.

#define BITS_IN_ROOM   (sizeof(Bits) * BITS_PER_BYTE)

Definition at line 424 of file regint.h.

#define BITS_PER_BYTE   8

Definition at line 422 of file regint.h.

#define BITSET_AT (   bs,
  pos 
)    (BS_ROOM(bs,pos) & BS_BIT(pos))

Definition at line 445 of file regint.h.

#define BITSET_CLEAR (   bs)
Value:
do {\
  int i;\
  for (i = 0; i < BITSET_SIZE; i++) { (bs)[i] = 0; }\
} while (0)

Definition at line 437 of file regint.h.

#define BITSET_CLEAR_BIT (   bs,
  pos 
)    BS_ROOM(bs,pos) &= ~(BS_BIT(pos))

Definition at line 447 of file regint.h.

#define BITSET_INVERT_BIT (   bs,
  pos 
)    BS_ROOM(bs,pos) ^= BS_BIT(pos)

Definition at line 448 of file regint.h.

#define BITSET_SET_BIT (   bs,
  pos 
)    BS_ROOM(bs,pos) |= BS_BIT(pos)

Definition at line 446 of file regint.h.

Definition at line 425 of file regint.h.

#define BS_BIT (   pos)    (1 << (pos % BITS_IN_ROOM))

Definition at line 443 of file regint.h.

#define BS_ROOM (   bs,
  pos 
)    (bs)[pos / BITS_IN_ROOM]

Definition at line 442 of file regint.h.

#define CCLASS_CLEAR_NOT (   cc)    (cc)->flags &= ~FLAG_CCLASS_NOT

Definition at line 790 of file regint.h.

#define CCLASS_SET_NOT (   cc)    (cc)->flags |= FLAG_CCLASS_NOT

Definition at line 789 of file regint.h.

#define CCLASS_SET_SHARE (   cc)    (cc)->flags |= FLAG_CCLASS_SHARE

Definition at line 791 of file regint.h.

#define CHECK_NULL_RETURN (   p)    if (IS_NULL(p)) return NULL

Definition at line 254 of file regint.h.

#define CHECK_NULL_RETURN_VAL (   p,
  val 
)    if (IS_NULL(p)) return (val)

Definition at line 255 of file regint.h.

#define DEFAULT_MATCH_STACK_LIMIT_SIZE   0 /* unlimited */

Definition at line 79 of file regint.h.

#define DEFAULT_VERB_WARN_FUNCTION   onig_rb_warning

Definition at line 114 of file regint.h.

#define DEFAULT_WARN_FUNCTION   onig_rb_warn

Definition at line 113 of file regint.h.

#define DIGITVAL (   code)    ((code) - '0')

Definition at line 392 of file regint.h.

#define FLAG_CCLASS_NOT   1

Definition at line 786 of file regint.h.

#define FLAG_CCLASS_SHARE   (1<<1)

Definition at line 787 of file regint.h.

#define GET_2BYTE_INT_INC (   type,
  i,
 
)
Value:
do {\
  (i) = (type )(((unsigned int )(*(p)) << B_SHIFT) | (unsigned int )((p)[1]));\
  (p) += 2;\
} while (0)

Definition at line 300 of file regint.h.

#define GET_4BYTE_INT_INC (   type,
  i,
 
)
Value:
do {\
  (i) = (type )(((unsigned int )((p)[0]) << B_SHIFT*3) | \
              ((unsigned int )((p)[1]) << B_SHIFT*2) | \
              ((unsigned int )((p)[2]) << B_SHIFT  ) | \
              ((unsigned int )((p)[3])             )); \
  (p) += 4;\
} while (0)

Definition at line 305 of file regint.h.

#define GET_8BYTE_INT_INC (   type,
  i,
 
)
Value:
do {\
  (i) = (type )(((unsigned long )((p)[0]) << B_SHIFT*7) | \
              ((unsigned long )((p)[1]) << B_SHIFT*6) | \
              ((unsigned long )((p)[2]) << B_SHIFT*5) | \
              ((unsigned long )((p)[3]) << B_SHIFT*4) | \
              ((unsigned long )((p)[4]) << B_SHIFT*3) | \
              ((unsigned long )((p)[5]) << B_SHIFT*2) | \
              ((unsigned long )((p)[6]) << B_SHIFT  ) | \
              ((unsigned long )((p)[7])             )); \
  (p) += 8;\
} while (0)

Definition at line 313 of file regint.h.

#define GET_ABSADDR_INC (   addr,
 
)    PLATFORM_GET_INC(addr, p, AbsAddrType)

Definition at line 692 of file regint.h.

#define GET_ALIGNMENT_PAD_SIZE (   addr,
  pad_size 
)
Value:
do {\
  (pad_size) = WORD_ALIGNMENT_SIZE \
               - ((unsigned int )(addr) % WORD_ALIGNMENT_SIZE);\
  if ((pad_size) == WORD_ALIGNMENT_SIZE) (pad_size) = 0;\
} while (0)

Definition at line 262 of file regint.h.

#define GET_BYTE_INC (   byte,
 
)
Value:
do{\
  byte = *(p);\
  (p)++;\
} while(0)

Definition at line 702 of file regint.h.

#define GET_CODE_POINT (   code,
 
)    code = *((OnigCodePoint* )(p))

Definition at line 701 of file regint.h.

#define GET_LENGTH_INC (   len,
 
)    PLATFORM_GET_INC(len, p, LengthType)

Definition at line 693 of file regint.h.

#define GET_MEMNUM_INC (   num,
 
)    PLATFORM_GET_INC(num, p, MemNumType)

Definition at line 694 of file regint.h.

#define GET_OPTION_INC (   option,
 
)    PLATFORM_GET_INC(option, p, OnigOptionType)

Definition at line 696 of file regint.h.

#define GET_POINTER_INC (   ptr,
 
)    PLATFORM_GET_INC(ptr, p, PointerType)

Definition at line 697 of file regint.h.

#define GET_RELADDR_INC (   addr,
 
)    PLATFORM_GET_INC(addr, p, RelAddrType)

Definition at line 691 of file regint.h.

#define GET_REPEATNUM_INC (   num,
 
)    PLATFORM_GET_INC(num, p, RepeatNumType)

Definition at line 695 of file regint.h.

#define GET_STATE_CHECK_NUM_INC (   num,
 
)    PLATFORM_GET_INC(num, p, StateCheckNumType)

Definition at line 698 of file regint.h.

#define INIT_MATCH_STACK_SIZE   160

Definition at line 78 of file regint.h.

#define INT_MAX_LIMIT   ((1UL << (SIZEOF_INT * 8 - 1)) - 1)

Definition at line 390 of file regint.h.

#define IS_CCLASS_NOT (   cc)    (((cc)->flags & FLAG_CCLASS_NOT) != 0)

Definition at line 792 of file regint.h.

#define IS_CCLASS_SHARE (   cc)    (((cc)->flags & FLAG_CCLASS_SHARE) != 0)

Definition at line 793 of file regint.h.

#define IS_DYNAMIC_OPTION (   option)    0

Definition at line 416 of file regint.h.

#define IS_EXTEND (   option)    ((option) & ONIG_OPTION_EXTEND)

Definition at line 401 of file regint.h.

#define IS_FIND_CONDITION (   option)
Value:

Definition at line 405 of file regint.h.

#define IS_FIND_LONGEST (   option)    ((option) & ONIG_OPTION_FIND_LONGEST)

Definition at line 402 of file regint.h.

#define IS_FIND_NOT_EMPTY (   option)    ((option) & ONIG_OPTION_FIND_NOT_EMPTY)

Definition at line 403 of file regint.h.

#define IS_IGNORECASE (   option)    ((option) & ONIG_OPTION_IGNORECASE)

Definition at line 400 of file regint.h.

#define IS_MC_ESC_CODE (   code,
  enc,
  syn 
)
Value:
((code) == MC_ESC(enc) && \
   !IS_SYNTAX_OP2((syn), ONIG_SYN_OP2_INEFFECTIVE_ESCAPE))

Definition at line 755 of file regint.h.

#define IS_MULTILINE (   option)    ((option) & ONIG_OPTION_MULTILINE)

Definition at line 399 of file regint.h.

#define IS_NOT_NULL (   p)    (((void*)(p)) != (void*)0)

Definition at line 253 of file regint.h.

#define IS_NOTBOL (   option)    ((option) & ONIG_OPTION_NOTBOL)

Definition at line 407 of file regint.h.

#define IS_NOTEOL (   option)    ((option) & ONIG_OPTION_NOTEOL)

Definition at line 408 of file regint.h.

#define IS_NULL (   p)    (((void*)(p)) == (void*)0)

Definition at line 252 of file regint.h.

#define IS_POSIX_REGION (   option)    ((option) & ONIG_OPTION_POSIX_REGION)

Definition at line 409 of file regint.h.

#define IS_POSIXLINE (   option)    (IS_SINGLELINE(option) && IS_MULTILINE(option))

Definition at line 404 of file regint.h.

#define IS_REPEAT_INFINITE (   n)    ((n) == REPEAT_INFINITE)

Definition at line 419 of file regint.h.

#define IS_SINGLELINE (   option)    ((option) & ONIG_OPTION_SINGLELINE)

Definition at line 398 of file regint.h.

#define MAX (   a,
 
)    (((a)<(b))?(b):(a))

Definition at line 250 of file regint.h.

#define MC_ANYCHAR (   enc)    (enc)->meta_char_table.anychar

Definition at line 749 of file regint.h.

#define MC_ANYCHAR_ANYTIME (   enc)    (enc)->meta_char_table.anychar_anytime

Definition at line 753 of file regint.h.

#define MC_ANYTIME (   enc)    (enc)->meta_char_table.anytime

Definition at line 750 of file regint.h.

#define MC_ESC (   enc)    (enc)->meta_char_table.esc

Definition at line 748 of file regint.h.

#define MC_ONE_OR_MORE_TIME (   enc)    (enc)->meta_char_table.one_or_more_time

Definition at line 752 of file regint.h.

#define MC_ZERO_OR_ONE_TIME (   enc)    (enc)->meta_char_table.zero_or_one_time

Definition at line 751 of file regint.h.

#define MIN (   a,
 
)    (((a)>(b))?(b):(a))

Definition at line 249 of file regint.h.

#define NULL_UCHARP   ((UChar* )0)

Definition at line 256 of file regint.h.

#define ODIGITVAL (   code)    DIGITVAL(code)

Definition at line 393 of file regint.h.

#define ONIG_OPTIMIZE_EXACT   1 /* Slow Search */

Definition at line 362 of file regint.h.

#define ONIG_OPTIMIZE_EXACT_BM   2 /* Boyer Moore Search */

Definition at line 363 of file regint.h.

#define ONIG_OPTIMIZE_EXACT_BM_NOT_REV   3 /* BM (but not simple match) */

Definition at line 364 of file regint.h.

#define ONIG_OPTIMIZE_EXACT_IC   4 /* Slow Search (ignore case) */

Definition at line 365 of file regint.h.

#define ONIG_OPTIMIZE_MAP   5 /* char map */

Definition at line 366 of file regint.h.

#define ONIG_OPTIMIZE_NONE   0

Definition at line 361 of file regint.h.

Definition at line 200 of file regint.h.

#define onig_st_add_direct_strend   st_add_direct_strend

Definition at line 201 of file regint.h.

Definition at line 203 of file regint.h.

#define onig_st_copy   st_copy

Definition at line 204 of file regint.h.

#define onig_st_delete   st_delete

Definition at line 193 of file regint.h.

Definition at line 194 of file regint.h.

Definition at line 199 of file regint.h.

Definition at line 202 of file regint.h.

Definition at line 188 of file regint.h.

Definition at line 189 of file regint.h.

#define onig_st_init_strend_table_with_size   st_init_strend_table_with_size

Definition at line 192 of file regint.h.

Definition at line 190 of file regint.h.

Definition at line 191 of file regint.h.

Definition at line 186 of file regint.h.

Definition at line 187 of file regint.h.

#define onig_st_insert   st_insert

Definition at line 195 of file regint.h.

#define onig_st_insert_strend   st_insert_strend

Definition at line 196 of file regint.h.

Definition at line 158 of file regint.h.

#define onig_st_lookup   st_lookup

Definition at line 197 of file regint.h.

#define onig_st_lookup_strend   st_lookup_strend

Definition at line 198 of file regint.h.

#define onig_st_nothing_key_clone   st_nothing_key_clone

Definition at line 205 of file regint.h.

#define onig_st_nothing_key_free   st_nothing_key_free

Definition at line 206 of file regint.h.

#define ONIG_STATE_DEC (   reg)    /* Nothing */

Definition at line 152 of file regint.h.

#define ONIG_STATE_DEC_THREAD (   reg)    /* Nothing */

Definition at line 154 of file regint.h.

#define ONIG_STATE_INC (   reg)    /* Nothing */

Definition at line 151 of file regint.h.

#define ONIG_STATE_INC_THREAD (   reg)    /* Nothing */

Definition at line 153 of file regint.h.

#define PLATFORM_GET_INC (   val,
  p,
  type 
)
Value:
do{\
  xmemcpy(&val, (p), sizeof(type));\
  (p) += sizeof(type);\
} while(0)

Definition at line 684 of file regint.h.

#define REPEAT_INFINITE   -1

Definition at line 418 of file regint.h.

#define SERIALIZE_2BYTE_INT (   i,
 
)
Value:
do {\
  *(p)     = ((i) >> B_SHIFT) & B_MASK;\
  *((p)+1) = (i) & B_MASK;\
} while (0)

Definition at line 277 of file regint.h.

#define SERIALIZE_4BYTE_INT (   i,
 
)
Value:
do {\
  *(p)     = ((i) >> B_SHIFT*3) & B_MASK;\
  *((p)+1) = ((i) >> B_SHIFT*2) & B_MASK;\
  *((p)+2) = ((i) >> B_SHIFT  ) & B_MASK;\
  *((p)+3) = (i) & B_MASK;\
} while (0)

Definition at line 282 of file regint.h.

#define SERIALIZE_8BYTE_INT (   i,
 
)
Value:
do {\
  *(p)     = ((i) >> B_SHIFT*7) & B_MASK;\
  *((p)+1) = ((i) >> B_SHIFT*6) & B_MASK;\
  *((p)+2) = ((i) >> B_SHIFT*5) & B_MASK;\
  *((p)+3) = ((i) >> B_SHIFT*4) & B_MASK;\
  *((p)+4) = ((i) >> B_SHIFT*3) & B_MASK;\
  *((p)+5) = ((i) >> B_SHIFT*2) & B_MASK;\
  *((p)+6) = ((i) >> B_SHIFT  ) & B_MASK;\
  *((p)+7) = (i) & B_MASK;\
} while (0)

Definition at line 289 of file regint.h.

#define SINGLE_BYTE_SIZE   (1 << BITS_PER_BYTE)

Definition at line 423 of file regint.h.

#define SIZE_ABSADDR   sizeof(AbsAddrType)

Definition at line 665 of file regint.h.

#define SIZE_BITSET   sizeof(BitSet)

Definition at line 435 of file regint.h.

#define SIZE_CODE_POINT   sizeof(OnigCodePoint)

Definition at line 671 of file regint.h.

#define SIZE_LENGTH   sizeof(LengthType)

Definition at line 666 of file regint.h.

#define SIZE_MEMNUM   sizeof(MemNumType)

Definition at line 667 of file regint.h.

Definition at line 709 of file regint.h.

Definition at line 710 of file regint.h.

Definition at line 738 of file regint.h.

#define SIZE_OP_FAIL   SIZE_OPCODE

Definition at line 724 of file regint.h.

Definition at line 737 of file regint.h.

Definition at line 721 of file regint.h.

Definition at line 711 of file regint.h.

Definition at line 735 of file regint.h.

Definition at line 729 of file regint.h.

Definition at line 727 of file regint.h.

Definition at line 728 of file regint.h.

Definition at line 730 of file regint.h.

Definition at line 725 of file regint.h.

Definition at line 726 of file regint.h.

Definition at line 734 of file regint.h.

Definition at line 733 of file regint.h.

#define SIZE_OP_POP   SIZE_OPCODE

Definition at line 713 of file regint.h.

Definition at line 720 of file regint.h.

Definition at line 732 of file regint.h.

Definition at line 712 of file regint.h.

Definition at line 715 of file regint.h.

Definition at line 736 of file regint.h.

Definition at line 714 of file regint.h.

Definition at line 718 of file regint.h.

Definition at line 719 of file regint.h.

Definition at line 731 of file regint.h.

Definition at line 716 of file regint.h.

Definition at line 717 of file regint.h.

Definition at line 739 of file regint.h.

Definition at line 722 of file regint.h.

Definition at line 723 of file regint.h.

Definition at line 742 of file regint.h.

Definition at line 745 of file regint.h.

Definition at line 743 of file regint.h.

Definition at line 744 of file regint.h.

#define SIZE_OPCODE   1

Definition at line 663 of file regint.h.

#define SIZE_OPTION   sizeof(OnigOptionType)

Definition at line 670 of file regint.h.

#define SIZE_POINTER   sizeof(PointerType)

Definition at line 672 of file regint.h.

#define SIZE_RELADDR   sizeof(RelAddrType)

Definition at line 664 of file regint.h.

#define SIZE_REPEATNUM   sizeof(RepeatNumType)

Definition at line 669 of file regint.h.

Definition at line 668 of file regint.h.

#define STACK_POP_LEVEL_ALL   2

Definition at line 358 of file regint.h.

#define STACK_POP_LEVEL_FREE   0

Definition at line 356 of file regint.h.

#define STACK_POP_LEVEL_MEM_START   1

Definition at line 357 of file regint.h.

#define STATE_CHECK_BUFF_MAX_SIZE   0x4000

Definition at line 119 of file regint.h.

Definition at line 118 of file regint.h.

Value:
( ONIG_SYN_CONTEXT_INDEP_ANCHORS | ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS | \
    ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS | ONIG_SYN_ALLOW_INVALID_INTERVAL | \
    ONIG_SYN_BACKSLASH_ESCAPE_IN_CC | ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC )

Definition at line 780 of file regint.h.

Value:
( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_BRACKET_CC | \
    ONIG_SYN_OP_POSIX_BRACKET | ONIG_SYN_OP_DECIMAL_BACKREF | \
    ONIG_SYN_OP_BRACE_INTERVAL | ONIG_SYN_OP_LPAREN_SUBEXP | \
    ONIG_SYN_OP_VBAR_ALT | \
    ONIG_SYN_OP_ASTERISK_ZERO_INF | ONIG_SYN_OP_PLUS_ONE_INF | \
    ONIG_SYN_OP_QMARK_ZERO_ONE | \
    ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR | ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR | \
    ONIG_SYN_OP_ESC_W_WORD | \
    ONIG_SYN_OP_ESC_B_WORD_BOUND | ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END | \
    ONIG_SYN_OP_ESC_S_WHITE_SPACE | ONIG_SYN_OP_ESC_D_DIGIT | \
    ONIG_SYN_OP_LINE_ANCHOR )

Definition at line 767 of file regint.h.

Value:
( ONIG_SYN_OP_DOT_ANYCHAR | ONIG_SYN_OP_POSIX_BRACKET | \
   ONIG_SYN_OP_DECIMAL_BACKREF | \
   ONIG_SYN_OP_BRACKET_CC | ONIG_SYN_OP_ASTERISK_ZERO_INF | \
   ONIG_SYN_OP_LINE_ANCHOR | \
   ONIG_SYN_OP_ESC_CONTROL_CHARS )

Definition at line 760 of file regint.h.

#define THREAD_ATOMIC_END   ENABLE_INTS

Definition at line 110 of file regint.h.

#define THREAD_ATOMIC_START   DEFER_INTS

Definition at line 109 of file regint.h.

#define THREAD_PASS   rb_thread_schedule()

Definition at line 111 of file regint.h.

#define THREAD_PASS_LIMIT_COUNT   8

Definition at line 121 of file regint.h.

Definition at line 108 of file regint.h.

Definition at line 107 of file regint.h.

#define USE_COMBINATION_EXPLOSION_CHECK   /* (X*)* */

Definition at line 105 of file regint.h.

#define USE_INFINITE_REPEAT_MONOMANIAC_MEM_STATUS_CHECK   /* /(?:()|())*\2/ */

Definition at line 62 of file regint.h.

Definition at line 106 of file regint.h.

#define USE_NAMED_GROUP

Definition at line 60 of file regint.h.

#define USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE   /* /\n$/ =~ "\n" */

Definition at line 63 of file regint.h.

Definition at line 73 of file regint.h.

Definition at line 74 of file regint.h.

Definition at line 72 of file regint.h.

Definition at line 76 of file regint.h.

Definition at line 75 of file regint.h.

#define USE_SUBEXP_CALL

Definition at line 61 of file regint.h.

Definition at line 64 of file regint.h.

Definition at line 260 of file regint.h.

#define xalloca   alloca

Definition at line 133 of file regint.h.

#define XDIGITVAL (   enc,
  code 
)
Value:
(ONIGENC_IS_CODE_DIGIT(enc,code) ? DIGITVAL(code) \
   : (ONIGENC_IS_CODE_UPPER(enc,code) ? (code) - 'A' + 10 : (code) - 'a' + 10))

Definition at line 394 of file regint.h.

#define xmemcpy   memcpy

Definition at line 123 of file regint.h.

#define xmemmove   memmove

Definition at line 124 of file regint.h.

#define xmemset   memset

Definition at line 122 of file regint.h.


Typedef Documentation

typedef int AbsAddrType

Definition at line 656 of file regint.h.

typedef struct _BBuf BBuf
typedef unsigned char Bits

Definition at line 430 of file regint.h.

Definition at line 432 of file regint.h.

typedef Bits* BitSetRef

Definition at line 433 of file regint.h.

typedef unsigned int BitStatusType

Definition at line 369 of file regint.h.

typedef int LengthType

Definition at line 657 of file regint.h.

typedef short int MemNumType

Definition at line 659 of file regint.h.

typedef void* PointerType

Definition at line 661 of file regint.h.

typedef int RelAddrType

Definition at line 655 of file regint.h.

typedef int RepeatNumType

Definition at line 658 of file regint.h.

typedef short int StateCheckNumType

Definition at line 660 of file regint.h.


Enumeration Type Documentation

enum OpCode
Enumerator:
OP_FINISH 
OP_END 
OP_EXACT1 
OP_EXACT2 
OP_EXACT3 
OP_EXACT4 
OP_EXACT5 
OP_EXACTN 
OP_EXACTMB2N1 
OP_EXACTMB2N2 
OP_EXACTMB2N3 
OP_EXACTMB2N 
OP_EXACTMB3N 
OP_EXACTMBN 
OP_EXACT1_IC 
OP_EXACTN_IC 
OP_CCLASS 
OP_CCLASS_MB 
OP_CCLASS_MIX 
OP_CCLASS_NOT 
OP_CCLASS_MB_NOT 
OP_CCLASS_MIX_NOT 
OP_CCLASS_NODE 
OP_ANYCHAR 
OP_ANYCHAR_ML 
OP_ANYCHAR_STAR 
OP_ANYCHAR_ML_STAR 
OP_ANYCHAR_STAR_PEEK_NEXT 
OP_ANYCHAR_ML_STAR_PEEK_NEXT 
OP_WORD 
OP_NOT_WORD 
OP_WORD_BOUND 
OP_NOT_WORD_BOUND 
OP_WORD_BEGIN 
OP_WORD_END 
OP_BEGIN_BUF 
OP_END_BUF 
OP_BEGIN_LINE 
OP_END_LINE 
OP_SEMI_END_BUF 
OP_BEGIN_POSITION 
OP_BACKREF1 
OP_BACKREF2 
OP_BACKREFN 
OP_BACKREFN_IC 
OP_BACKREF_MULTI 
OP_BACKREF_MULTI_IC 
OP_BACKREF_AT_LEVEL 
OP_MEMORY_START 
OP_MEMORY_START_PUSH 
OP_MEMORY_END_PUSH 
OP_MEMORY_END_PUSH_REC 
OP_MEMORY_END 
OP_MEMORY_END_REC 
OP_SET_OPTION_PUSH 
OP_SET_OPTION 
OP_FAIL 
OP_JUMP 
OP_PUSH 
OP_POP 
OP_PUSH_OR_JUMP_EXACT1 
OP_PUSH_IF_PEEK_NEXT 
OP_REPEAT 
OP_REPEAT_NG 
OP_REPEAT_INC 
OP_REPEAT_INC_NG 
OP_REPEAT_INC_SG 
OP_REPEAT_INC_NG_SG 
OP_NULL_CHECK_START 
OP_NULL_CHECK_END 
OP_NULL_CHECK_END_MEMST 
OP_NULL_CHECK_END_MEMST_PUSH 
OP_PUSH_POS 
OP_POP_POS 
OP_PUSH_POS_NOT 
OP_FAIL_POS 
OP_PUSH_STOP_BT 
OP_POP_STOP_BT 
OP_LOOK_BEHIND 
OP_PUSH_LOOK_BEHIND_NOT 
OP_FAIL_LOOK_BEHIND_NOT 
OP_CALL 
OP_RETURN 
OP_STATE_CHECK_PUSH 
OP_STATE_CHECK_PUSH_OR_JUMP 
OP_STATE_CHECK 
OP_STATE_CHECK_ANYCHAR_STAR 
OP_STATE_CHECK_ANYCHAR_ML_STAR 

Definition at line 551 of file regint.h.

            {
  OP_FINISH = 0,        /* matching process terminator (no more alternative) */
  OP_END    = 1,        /* pattern code terminator (success end) */

  OP_EXACT1 = 2,        /* single byte, N = 1 */
  OP_EXACT2,            /* single byte, N = 2 */
  OP_EXACT3,            /* single byte, N = 3 */
  OP_EXACT4,            /* single byte, N = 4 */
  OP_EXACT5,            /* single byte, N = 5 */
  OP_EXACTN,            /* single byte */
  OP_EXACTMB2N1,        /* mb-length = 2 N = 1 */
  OP_EXACTMB2N2,        /* mb-length = 2 N = 2 */
  OP_EXACTMB2N3,        /* mb-length = 2 N = 3 */
  OP_EXACTMB2N,         /* mb-length = 2 */
  OP_EXACTMB3N,         /* mb-length = 3 */
  OP_EXACTMBN,          /* other length */

  OP_EXACT1_IC,         /* single byte, N = 1, ignore case */
  OP_EXACTN_IC,         /* single byte,        ignore case */

  OP_CCLASS,
  OP_CCLASS_MB,
  OP_CCLASS_MIX,
  OP_CCLASS_NOT,
  OP_CCLASS_MB_NOT,
  OP_CCLASS_MIX_NOT,
  OP_CCLASS_NODE,       /* pointer to CClassNode node */

  OP_ANYCHAR,                 /* "."  */
  OP_ANYCHAR_ML,              /* "."  multi-line */
  OP_ANYCHAR_STAR,            /* ".*" */
  OP_ANYCHAR_ML_STAR,         /* ".*" multi-line */
  OP_ANYCHAR_STAR_PEEK_NEXT,
  OP_ANYCHAR_ML_STAR_PEEK_NEXT,

  OP_WORD,
  OP_NOT_WORD,
  OP_WORD_BOUND,
  OP_NOT_WORD_BOUND,
  OP_WORD_BEGIN,
  OP_WORD_END,

  OP_BEGIN_BUF,
  OP_END_BUF,
  OP_BEGIN_LINE,
  OP_END_LINE,
  OP_SEMI_END_BUF,
  OP_BEGIN_POSITION,

  OP_BACKREF1,
  OP_BACKREF2,
  OP_BACKREFN,
  OP_BACKREFN_IC,
  OP_BACKREF_MULTI,
  OP_BACKREF_MULTI_IC,
  OP_BACKREF_AT_LEVEL,    /* \k<xxx+n>, \k<xxx-n> */

  OP_MEMORY_START,
  OP_MEMORY_START_PUSH,   /* push back-tracker to stack */
  OP_MEMORY_END_PUSH,     /* push back-tracker to stack */
  OP_MEMORY_END_PUSH_REC, /* push back-tracker to stack */
  OP_MEMORY_END,
  OP_MEMORY_END_REC,      /* push marker to stack */

  OP_SET_OPTION_PUSH,    /* set option and push recover option */
  OP_SET_OPTION,         /* set option */

  OP_FAIL,               /* pop stack and move */
  OP_JUMP,
  OP_PUSH,
  OP_POP,
  OP_PUSH_OR_JUMP_EXACT1,  /* if match exact then push, else jump. */
  OP_PUSH_IF_PEEK_NEXT,    /* if match exact then push, else none. */
  OP_REPEAT,               /* {n,m} */
  OP_REPEAT_NG,            /* {n,m}? (non greedy) */
  OP_REPEAT_INC,
  OP_REPEAT_INC_NG,        /* non greedy */
  OP_REPEAT_INC_SG,        /* search and get in stack */
  OP_REPEAT_INC_NG_SG,     /* search and get in stack (non greedy) */
  OP_NULL_CHECK_START,     /* null loop checker start */
  OP_NULL_CHECK_END,       /* null loop checker end   */
  OP_NULL_CHECK_END_MEMST, /* null loop checker end (with capture status) */
  OP_NULL_CHECK_END_MEMST_PUSH, /* with capture status and push check-end */

  OP_PUSH_POS,             /* (?=...)  start */
  OP_POP_POS,              /* (?=...)  end   */
  OP_PUSH_POS_NOT,         /* (?!...)  start */
  OP_FAIL_POS,             /* (?!...)  end   */
  OP_PUSH_STOP_BT,         /* (?>...)  start */
  OP_POP_STOP_BT,          /* (?>...)  end   */
  OP_LOOK_BEHIND,          /* (?<=...) start (no needs end opcode) */
  OP_PUSH_LOOK_BEHIND_NOT, /* (?<!...) start */
  OP_FAIL_LOOK_BEHIND_NOT, /* (?<!...) end   */

  OP_CALL,                 /* \g<name> */
  OP_RETURN,

  OP_STATE_CHECK_PUSH,         /* combination explosion check and push */
  OP_STATE_CHECK_PUSH_OR_JUMP, /* check ok -> push, else jump  */
  OP_STATE_CHECK,              /* check only */
  OP_STATE_CHECK_ANYCHAR_STAR,
  OP_STATE_CHECK_ANYCHAR_ML_STAR
};

Function Documentation

int onig_bbuf_init P_ ( (BBuf *buf, int size)  )
int onig_alloc_init P_ ( (regex_t **reg, OnigOptionType option, OnigAmbigType ambig_flag, OnigEncoding enc, OnigSyntaxType *syntax)  )
int onig_compile P_ ( (regex_t *reg, const UChar *pattern, const UChar *pattern_end, OnigErrorInfo *einfo)  )
void onig_chain_reduce P_ ( (regex_t *reg)  )
void onig_transfer P_ ( (regex_t *to, regex_t *from)  )
void onig_snprintf_with_pattern PV_ ( (UChar buf[], int bufsize, OnigEncoding enc, UChar *pat, UChar *pat_end, const UChar *fmt,...)  )