Back to index

php5  5.3.10
onigcmpt200.h
Go to the documentation of this file.
00001 /**********************************************************************
00002 
00003   onigcmpt200.h - Oniguruma (regular expression library)
00004 
00005   Copyright (C) 2004  K.Kosako (kosako@sofnec.co.jp)
00006 
00007 **********************************************************************/
00008 #ifndef ONIGCMPT200_H
00009 #define ONIGCMPT200_H
00010 
00011 /* constants */
00012 #define REG_MAX_ERROR_MESSAGE_LEN  ONIG_MAX_ERROR_MESSAGE_LEN
00013 
00014 #define RegCharEncoding           OnigEncoding
00015 
00016 #define REG_ENCODING_ASCII        ONIG_ENCODING_ASCII        
00017 #define REG_ENCODING_ISO_8859_1   ONIG_ENCODING_ISO_8859_1
00018 #define REG_ENCODING_ISO_8859_15  ONIG_ENCODING_ISO_8859_15
00019 #define REG_ENCODING_UTF8         ONIG_ENCODING_UTF8
00020 #define REG_ENCODING_EUC_JP       ONIG_ENCODING_EUC_JP
00021 #define REG_ENCODING_SJIS         ONIG_ENCODING_SJIS
00022 #define REG_ENCODING_BIG5         ONIG_ENCODING_BIG5
00023 #define REG_ENCODING_UNDEF        ONIG_ENCODING_UNDEF
00024 
00025 /* Don't use REGCODE_XXXX. (obsoleted) */
00026 #define REGCODE_UNDEF         REG_ENCODING_UNDEF
00027 #define REGCODE_ASCII         REG_ENCODING_ASCII
00028 #define REGCODE_UTF8          REG_ENCODING_UTF8
00029 #define REGCODE_EUCJP         REG_ENCODING_EUC_JP
00030 #define REGCODE_SJIS          REG_ENCODING_SJIS
00031 
00032 /* Don't use REGCODE_XXXX. (obsoleted) */
00033 #define MBCTYPE_ASCII         RE_MBCTYPE_ASCII
00034 #define MBCTYPE_EUC           RE_MBCTYPE_EUC
00035 #define MBCTYPE_SJIS          RE_MBCTYPE_SJIS
00036 #define MBCTYPE_UTF8          RE_MBCTYPE_UTF8
00037 
00038 typedef unsigned char*   RegTransTableType;
00039 #define RegOptionType    OnigOptionType
00040 #define RegDistance      OnigDistance
00041 
00042 #define REG_OPTION_DEFAULT      ONIG_OPTION_DEFAULT
00043 
00044 /* options */
00045 #define REG_OPTION_NONE                 ONIG_OPTION_NONE
00046 #define REG_OPTION_SINGLELINE           ONIG_OPTION_SINGLELINE
00047 #define REG_OPTION_MULTILINE            ONIG_OPTION_MULTILINE
00048 #define REG_OPTION_IGNORECASE           ONIG_OPTION_IGNORECASE
00049 #define REG_OPTION_EXTEND               ONIG_OPTION_EXTEND
00050 #define REG_OPTION_FIND_LONGEST         ONIG_OPTION_FIND_LONGEST
00051 #define REG_OPTION_FIND_NOT_EMPTY       ONIG_OPTION_FIND_NOT_EMPTY
00052 #define REG_OPTION_NEGATE_SINGLELINE    ONIG_OPTION_NEGATE_SINGLELINE
00053 #define REG_OPTION_DONT_CAPTURE_GROUP   ONIG_OPTION_DONT_CAPTURE_GROUP
00054 #define REG_OPTION_CAPTURE_GROUP        ONIG_OPTION_CAPTURE_GROUP
00055 #define REG_OPTION_NOTBOL               ONIG_OPTION_NOTBOL
00056 #define REG_OPTION_NOTEOL               ONIG_OPTION_NOTEOL
00057 #define REG_OPTION_POSIX_REGION         ONIG_OPTION_POSIX_REGION
00058 
00059 #define REG_OPTION_ON                   ONIG_OPTION_ON 
00060 #define REG_OPTION_OFF                  ONIG_OPTION_OFF
00061 #define IS_REG_OPTION_ON                ONIG_IS_OPTION_ON
00062 
00063 /* syntax */
00064 #define RegSyntaxType OnigSyntaxType
00065 
00066 #define RegSyntaxPosixBasic     OnigSyntaxPosixBasic
00067 #define RegSyntaxPosixExtended  OnigSyntaxPosixExtended
00068 #define RegSyntaxEmacs          OnigSyntaxEmacs
00069 #define RegSyntaxGrep           OnigSyntaxGrep
00070 #define RegSyntaxGnuRegex       OnigSyntaxGnuRegex
00071 #define RegSyntaxJava           OnigSyntaxJava
00072 #define RegSyntaxPerl           OnigSyntaxPerl
00073 #define RegSyntaxRuby           OnigSyntaxRuby
00074 
00075 #define REG_SYNTAX_POSIX_BASIC     ONIG_SYNTAX_POSIX_BASIC
00076 #define REG_SYNTAX_POSIX_EXTENDED  ONIG_SYNTAX_POSIX_EXTENDED
00077 #define REG_SYNTAX_EMACS           ONIG_SYNTAX_EMACS
00078 #define REG_SYNTAX_GREP            ONIG_SYNTAX_GREP
00079 #define REG_SYNTAX_GNU_REGEX       ONIG_SYNTAX_GNU_REGEX       
00080 #define REG_SYNTAX_JAVA            ONIG_SYNTAX_JAVA
00081 #define REG_SYNTAX_PERL            ONIG_SYNTAX_PERL
00082 #define REG_SYNTAX_RUBY            ONIG_SYNTAX_RUBY
00083 
00084 #define REG_SYNTAX_DEFAULT         ONIG_SYNTAX_DEFAULT
00085 #define RegDefaultSyntax           OnigDefaultSyntax
00086 
00087 /* syntax (operators) */
00088 #define REG_SYN_OP_VARIABLE_META_CHARACTERS \
00089        ONIG_SYN_OP_VARIABLE_META_CHARACTERS
00090 #define REG_SYN_OP_DOT_ANYCHAR \
00091        ONIG_SYN_OP_DOT_ANYCHAR
00092 #define REG_SYN_OP_ASTERISK_ZERO_INF \
00093        ONIG_SYN_OP_ASTERISK_ZERO_INF
00094 #define REG_SYN_OP_ESC_ASTERISK_ZERO_INF \
00095        ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF
00096 #define REG_SYN_OP_PLUS_ONE_INF \
00097        ONIG_SYN_OP_PLUS_ONE_INF
00098 #define REG_SYN_OP_ESC_PLUS_ONE_INF \
00099        ONIG_SYN_OP_ESC_PLUS_ONE_INF
00100 #define REG_SYN_OP_QMARK_ZERO_ONE \
00101        ONIG_SYN_OP_QMARK_ZERO_ONE
00102 #define REG_SYN_OP_ESC_QMARK_ZERO_ONE \
00103        ONIG_SYN_OP_ESC_QMARK_ZERO_ONE
00104 #define REG_SYN_OP_BRACE_INTERVAL \
00105        ONIG_SYN_OP_BRACE_INTERVAL
00106 #define REG_SYN_OP_ESC_BRACE_INTERVAL \
00107        ONIG_SYN_OP_ESC_BRACE_INTERVAL
00108 #define REG_SYN_OP_VBAR_ALT \
00109        ONIG_SYN_OP_VBAR_ALT
00110 #define REG_SYN_OP_ESC_VBAR_ALT \
00111        ONIG_SYN_OP_ESC_VBAR_ALT
00112 #define REG_SYN_OP_LPAREN_SUBEXP \
00113        ONIG_SYN_OP_LPAREN_SUBEXP
00114 #define REG_SYN_OP_ESC_LPAREN_SUBEXP \
00115        ONIG_SYN_OP_ESC_LPAREN_SUBEXP
00116 #define REG_SYN_OP_ESC_AZ_BUF_ANCHOR \
00117        ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR
00118 #define REG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR \
00119        ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR
00120 #define REG_SYN_OP_DECIMAL_BACKREF \
00121        ONIG_SYN_OP_DECIMAL_BACKREF
00122 #define REG_SYN_OP_BRACKET_CC \
00123        ONIG_SYN_OP_BRACKET_CC
00124 #define REG_SYN_OP_ESC_W_WORD \
00125        ONIG_SYN_OP_ESC_W_WORD
00126 #define REG_SYN_OP_ESC_LTGT_WORD_BEGIN_END \
00127        ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END
00128 #define REG_SYN_OP_ESC_B_WORD_BOUND \
00129        ONIG_SYN_OP_ESC_B_WORD_BOUND
00130 #define REG_SYN_OP_ESC_S_WHITE_SPACE \
00131        ONIG_SYN_OP_ESC_S_WHITE_SPACE
00132 #define REG_SYN_OP_ESC_D_DIGIT \
00133        ONIG_SYN_OP_ESC_D_DIGIT
00134 #define REG_SYN_OP_LINE_ANCHOR \
00135        ONIG_SYN_OP_LINE_ANCHOR
00136 #define REG_SYN_OP_POSIX_BRACKET \
00137        ONIG_SYN_OP_POSIX_BRACKET
00138 #define REG_SYN_OP_QMARK_NON_GREEDY \
00139        ONIG_SYN_OP_QMARK_NON_GREEDY
00140 #define REG_SYN_OP_ESC_CONTROL_CHARS \
00141        ONIG_SYN_OP_ESC_CONTROL_CHARS
00142 #define REG_SYN_OP_ESC_C_CONTROL \
00143        ONIG_SYN_OP_ESC_C_CONTROL
00144 #define REG_SYN_OP_ESC_OCTAL3 \
00145        ONIG_SYN_OP_ESC_OCTAL3
00146 #define REG_SYN_OP_ESC_X_HEX2 \
00147        ONIG_SYN_OP_ESC_X_HEX2
00148 #define REG_SYN_OP_ESC_X_BRACE_HEX8 \
00149        ONIG_SYN_OP_ESC_X_BRACE_HEX8
00150 
00151 #define REG_SYN_OP2_ESC_CAPITAL_Q_QUOTE \
00152        ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE
00153 #define REG_SYN_OP2_QMARK_GROUP_EFFECT \
00154        ONIG_SYN_OP2_QMARK_GROUP_EFFECT
00155 #define REG_SYN_OP2_OPTION_PERL \
00156        ONIG_SYN_OP2_OPTION_PERL
00157 #define REG_SYN_OP2_OPTION_RUBY \
00158        ONIG_SYN_OP2_OPTION_RUBY
00159 #define REG_SYN_OP2_PLUS_POSSESSIVE_REPEAT \
00160        ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT
00161 #define REG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL \
00162        ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL
00163 #define REG_SYN_OP2_CCLASS_SET_OP \
00164        ONIG_SYN_OP2_CCLASS_SET_OP
00165 #define REG_SYN_OP2_QMARK_LT_NAMED_GROUP \
00166        ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP
00167 #define REG_SYN_OP2_ESC_K_NAMED_BACKREF \
00168        ONIG_SYN_OP2_ESC_K_NAMED_BACKREF
00169 #define REG_SYN_OP2_ESC_G_SUBEXP_CALL \
00170        ONIG_SYN_OP2_ESC_G_SUBEXP_CALL
00171 #define REG_SYN_OP2_ATMARK_CAPTURE_HISTORY \
00172        ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY
00173 #define REG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL \
00174        ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL
00175 #define REG_SYN_OP2_ESC_CAPITAL_M_BAR_META \
00176        ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META
00177 #define REG_SYN_OP2_ESC_V_VTAB \
00178        ONIG_SYN_OP2_ESC_V_VTAB
00179 #define REG_SYN_OP2_ESC_U_HEX4 \
00180        ONIG_SYN_OP2_ESC_U_HEX4
00181 #define REG_SYN_OP2_ESC_GNU_BUF_ANCHOR \
00182        ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR
00183 
00184 #define REG_SYN_CONTEXT_INDEP_ANCHORS \
00185        ONIG_SYN_CONTEXT_INDEP_ANCHORS
00186 #define REG_SYN_CONTEXT_INDEP_REPEAT_OPS \
00187        ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS
00188 #define REG_SYN_CONTEXT_INVALID_REPEAT_OPS \
00189        ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS
00190 #define REG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP \
00191        ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP
00192 #define REG_SYN_ALLOW_INVALID_INTERVAL \
00193        ONIG_SYN_ALLOW_INVALID_INTERVAL
00194 #define REG_SYN_STRICT_CHECK_BACKREF \
00195        ONIG_SYN_STRICT_CHECK_BACKREF
00196 #define REG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND \
00197        ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND
00198 #define REG_SYN_CAPTURE_ONLY_NAMED_GROUP \
00199        ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP
00200 #define REG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME \
00201        ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME
00202 
00203 #define REG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC \
00204        ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC
00205 #define REG_SYN_BACKSLASH_ESCAPE_IN_CC \
00206        ONIG_SYN_BACKSLASH_ESCAPE_IN_CC
00207 #define REG_SYN_ALLOW_EMPTY_RANGE_IN_CC \
00208        ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC
00209 #define REG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC \
00210        ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC
00211 #define REG_SYN_WARN_CC_OP_NOT_ESCAPED \
00212        ONIG_SYN_WARN_CC_OP_NOT_ESCAPED
00213 #define REG_SYN_WARN_REDUNDANT_NESTED_REPEAT \
00214        ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT
00215 
00216 /* meta character specifiers (regex_set_meta_char()) */
00217 #define REG_META_CHAR_ESCAPE            ONIG_META_CHAR_ESCAPE
00218 #define REG_META_CHAR_ANYCHAR           ONIG_META_CHAR_ANYCHAR
00219 #define REG_META_CHAR_ANYTIME           ONIG_META_CHAR_ANYTIME
00220 #define REG_META_CHAR_ZERO_OR_ONE_TIME  ONIG_META_CHAR_ZERO_OR_ONE_TIME
00221 #define REG_META_CHAR_ONE_OR_MORE_TIME  ONIG_META_CHAR_ONE_OR_MORE_TIME
00222 #define REG_META_CHAR_ANYCHAR_ANYTIME   ONIG_META_CHAR_ANYCHAR_ANYTIME
00223 
00224 #define REG_INEFFECTIVE_META_CHAR       ONIG_INEFFECTIVE_META_CHAR
00225 
00226 /* error codes */
00227 #define REG_IS_PATTERN_ERROR  ONIG_IS_PATTERN_ERROR
00228 /* normal return */
00229 #define REG_NORMAL               ONIG_NORMAL
00230 #define REG_MISMATCH             ONIG_MISMATCH
00231 #define REG_NO_SUPPORT_CONFIG    ONIG_NO_SUPPORT_CONFIG
00232 /* internal error */
00233 #define REGERR_MEMORY                    ONIGERR_MEMORY
00234 #define REGERR_MATCH_STACK_LIMIT_OVER    ONIGERR_MATCH_STACK_LIMIT_OVER
00235 #define REGERR_TYPE_BUG                  ONIGERR_TYPE_BUG
00236 #define REGERR_PARSER_BUG                ONIGERR_PARSER_BUG
00237 #define REGERR_STACK_BUG                 ONIGERR_STACK_BUG
00238 #define REGERR_UNDEFINED_BYTECODE        ONIGERR_UNDEFINED_BYTECODE
00239 #define REGERR_UNEXPECTED_BYTECODE       ONIGERR_UNEXPECTED_BYTECODE
00240 #define REGERR_DEFAULT_ENCODING_IS_NOT_SETTED \
00241        ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED
00242 #define REGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR \
00243        ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR
00244 /* general error */
00245 #define REGERR_INVALID_ARGUMENT     ONIGERR_INVALID_ARGUMENT
00246 /* errors related to thread */
00247 #define REGERR_OVER_THREAD_PASS_LIMIT_COUNT \
00248        ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT
00249 
00250 
00251 /* must be smaller than BIT_STATUS_BITS_NUM (unsigned int * 8) */
00252 #define REG_MAX_CAPTURE_HISTORY_GROUP      ONIG_MAX_CAPTURE_HISTORY_GROUP
00253 #define REG_IS_CAPTURE_HISTORY_GROUP       ONIG_IS_CAPTURE_HISTORY_GROUP
00254 
00255 #define REG_REGION_NOTPOS      ONIG_REGION_NOTPOS
00256 
00257 #define RegRegion        OnigRegion
00258 #define RegErrorInfo     OnigErrorInfo
00259 #define RegRepeatRange   OnigRepeatRange
00260 
00261 #define RegWarnFunc      OnigWarnFunc
00262 #define regex_null_warn  onig_null_warn
00263 #define REG_NULL_WARN    ONIG_NULL_WARN
00264 
00265 /* regex_t state */
00266 #define REG_STATE_NORMAL      ONIG_STATE_NORMAL
00267 #define REG_STATE_SEARCHING   ONIG_STATE_SEARCHING
00268 #define REG_STATE_COMPILING   ONIG_STATE_COMPILING
00269 #define REG_STATE_MODIFY      ONIG_STATE_MODIFY
00270 
00271 #define REG_STATE     ONIG_STATE
00272 
00273 /* Oniguruma Native API */
00274 #define regex_init                   onig_init
00275 #define regex_error_code_to_str      onig_error_code_to_str
00276 #define regex_set_warn_func          onig_set_warn_func      
00277 #define regex_set_verb_warn_func     onig_set_verb_warn_func
00278 #define regex_new                    onig_new
00279 #define regex_free                   onig_free
00280 #define regex_recompile              onig_recompile
00281 #define regex_search                 onig_search
00282 #define regex_match                  onig_match
00283 #define regex_region_new             onig_region_new
00284 #define regex_region_free            onig_region_free
00285 #define regex_region_copy            onig_region_copy
00286 #define regex_region_clear           onig_region_clear
00287 #define regex_region_resize          onig_region_resize
00288 #define regex_name_to_group_numbers  onig_name_to_group_numbers
00289 #define regex_name_to_backref_number onig_name_to_backref_number
00290 #define regex_foreach_name           onig_foreach_name 
00291 #define regex_number_of_names        onig_number_of_names
00292 #define regex_get_encoding           onig_get_encoding
00293 #define regex_get_options            onig_get_options
00294 #define regex_get_syntax             onig_get_syntax
00295 #define regex_set_default_syntax     onig_set_default_syntax
00296 #define regex_copy_syntax            onig_copy_syntax 
00297 #define regex_set_meta_char          onig_set_meta_char
00298 #define regex_end                    onig_end
00299 #define regex_version                onig_version
00300 
00301 /* encoding API */
00302 #define enc_get_prev_char_head          onigenc_get_prev_char_head
00303 #define enc_get_left_adjust_char_head   onigenc_get_left_adjust_char_head 
00304 #define enc_get_right_adjust_char_head  onigenc_get_right_adjust_char_head
00305 /* obsoleted API */
00306 #define regex_get_prev_char_head         onigenc_get_prev_char_head
00307 #define regex_get_left_adjust_char_head  onigenc_get_left_adjust_char_head
00308 #define regex_get_right_adjust_char_head onigenc_get_right_adjust_char_head
00309 
00310 #endif /* ONIGCMPT200_H */