diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2018-05-01 09:43:15 +0200 | 
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2018-05-01 09:43:15 +0200 | 
| commit | 031a61b81318d9df626b2a332713eb1effa997a1 (patch) | |
| tree | 085e531ee4e07594d904106413989fa5fdf14be8 /doc | |
| parent | 5587db012cd0e8f69f811e8959a861112904136a (diff) | |
| parent | 38848ee931202f14ff21b07de1033e6fcd17f079 (diff) | |
Merge branch 'release/6.8.1-1'6.8.1-1
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/API | 134 | ||||
| -rw-r--r-- | doc/API.ja | 132 | ||||
| -rw-r--r-- | doc/CALLOUTS.BUILTIN | 88 | ||||
| -rw-r--r-- | doc/CALLOUTS.BUILTIN.ja | 88 | ||||
| -rw-r--r-- | doc/FAQ | 6 | ||||
| -rw-r--r-- | doc/RE | 22 | ||||
| -rw-r--r-- | doc/RE.ja | 29 | 
7 files changed, 488 insertions, 11 deletions
| @@ -1,4 +1,4 @@ -Oniguruma API  Version 6.7.0  2017/12/08 +Oniguruma API  Version 6.8.0  2018/03/13  #include <oniguruma.h> @@ -222,6 +222,77 @@ Oniguruma API  Version 6.7.0  2017/12/08    1 reg: regex object. +# OnigMatchParam* onig_new_match_param() + +  Allocate a OnigMatchParam object and initialize the contents by +  onig_initialize_match_param(). + + +# void onig_free_match_param(OnigMatchParam* mp) + +  Free memory used by a OnigMatchParam object. + +  arguments +  1 mp: OnigMatchParam object + + +# void onig_initialize_match_param(OnigMatchParam* mp) + +  Set match-param fields to default values. +  Match-param is used in onig_match_with_param() and onig_search_with_param(). + +  arguments +  1 mp: match-param pointer + + +# int onig_set_match_stack_limit_size_of_match_param(OnigMatchParam* mp, unsigned int limit) + +  Set a maximum number of match-stack depth. +  0 means unlimited. + +  arguments +  1 mp: match-param pointer +  2 limit: number of limit + +  normal return: ONIG_NORMAL + + +# int onig_set_retry_limit_in_match_of_match_param(OnigMatchParam* mp, unsigned long limit) + +  Set a retry limit count of a match process. + +  arguments +  1 mp: match-param pointer +  2 limit: number of limit + +  normal return: ONIG_NORMAL + + +# int onig_set_progress_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + +  Set a function for callouts of contents in progress. +  If 0 (NULL) is set, never called in progress. + +  arguments +  1 mp: match-param pointer +  2 f: function + +  normal return: ONIG_NORMAL + + +# int onig_set_retraction_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + +  Set a function for callouts of contents in retraction (backtrack). +  If 0 (NULL) is set, never called in retraction. + +  arguments +  1 mp: match-param pointer +  2 f: function + +  normal return: ONIG_NORMAL + + +  # int onig_search(regex_t* reg, const UChar* str, const UChar* end, const UChar* start,                     const UChar* range, OnigRegion* region, OnigOptionType option) @@ -246,8 +317,17 @@ Oniguruma API  Version 6.7.0  2017/12/08      ONIG_OPTION_POSIX_REGION  region argument is regmatch_t[] of POSIX API. +# int onig_search_with_param(regex_t* reg, const UChar* str, const UChar* end, +                   const UChar* start, const UChar* range, OnigRegion* region, +                   OnigOptionType option, OnigMatchParam* mp) + +   arguments +   1-7:  same as onig_search() +   8 mp: match parameter values (match_stack_limit, retry_limit_in_match) + +  # int onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at, -		 OnigRegion* region, OnigOptionType option) +                 OnigRegion* region, OnigOptionType option)    Match string and return result and matching region. @@ -267,6 +347,15 @@ Oniguruma API  Version 6.7.0  2017/12/08      ONIG_OPTION_POSIX_REGION region argument is regmatch_t[] type of POSIX API. +# int onig_match_with_param(regex_t* reg, const UChar* str, const UChar* end, +                            const UChar* at, OnigRegion* region, +                            OnigOptionType option, OnigMatchParam* mp) + +   arguments +   1-6:  same as onig_match() +   7 mp: match parameter values (match_stack_limit, retry_limit_in_match) + +  # int onig_scan(regex_t* reg, const UChar* str, const UChar* end,                  OnigRegion* region, OnigOptionType option,                  int (*scan_callback)(int, int, OnigRegion*, void*), @@ -623,6 +712,47 @@ Oniguruma API  Version 6.7.0  2017/12/08    normal return: ONIG_NORMAL +# unsigned long onig_get_retry_limit_in_match(void) + +  Return the limit of retry counts in matching process. +  (default: 10000000) + +  normal return: limit value + + +# int onig_set_retry_limit_in_match(unsigned long n) + +  Set the limit of retry counts in matching process. + +  normal return: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_progress_callout(void) + +  Get a function for callouts of contents in progress. + + +# int onig_set_progress_callout(OnigCalloutFunc f) + +  Set a function for callouts of contents in progress. +  If 0 (NULL) is set, never called in progress. + +  normal return: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_retraction_callout(void) + +  Get a function for callouts of contents in retraction (backtrack). + + +# int onig_set_retraction_callout(OnigCalloutFunc f) + +  Set a function for callouts of contents in retraction (backtrack). +  If 0 (NULL) is set, never called in retraction. + +  normal return: ONIG_NORMAL + +  # int onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges))    Define new Unicode property. @@ -1,4 +1,4 @@ -鬼車インターフェース Version 6.7.0   2017/12/08 +鬼車インターフェース Version 6.8.0   2018/03/13  #include <oniguruma.h> @@ -220,6 +220,77 @@    1 reg: 正規表現オブジェクト +# OnigMatchParam* onig_new_match_param() + +  OnigMatchParamオブジェクトを生成し、onig_initialize_match_param()を使用して +  中身を初期化する。 + + +# void onig_free_match_param(OnigMatchParam* mp) + +  OnigMatchParamオブジェクトで使用しているメモリを開放する。 + +  引数 +  1 mp: OnigMatchParamオブジェクト + + +# void onig_initialize_match_param(OnigMatchParam* mp) + +  マッチパラメタ構造体にデフォルト値をセットする。 +  マッチパラメタは、onig_match_with_param(), onig_search_with_param()で +  使用される。 + +  引数 +  1 mp: マッチパラメタオブジェクトアドレス + + +# int onig_set_match_stack_limit_size_of_match_param(OnigMatchParam* mp, unsigned int limit) + +  マッチスタックの最大深さをセットする。 +  0は、無制限を表す。 + +  引数 +  1 mp: マッチパラメタオブジェクトアドレス +  2 limit: 制限数 + +  正常終了戻り値: ONIG_NORMAL + + +# int onig_set_retry_limit_in_match_of_match_param(OnigMatchParam* mp, unsigned long limit) + +  一回のマッチでのリトライ数の最大値をセットする。 + +  引数 +  1 mp: マッチパラメタオブジェクトアドレス +  2 limit: 制限回数 + +  正常終了戻り値: ONIG_NORMAL + + +# int onig_set_progress_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + +  前進時の内容の呼び出し(callouts)で呼び出される関数をセットする。 +  もし0(NULL)がセットされると、前進時に呼び出しは起こらない。 + +  引数 +  1 mp: マッチパラメタオブジェクトアドレス +  2 f: 呼び出される関数 + +  正常終了戻り値: ONIG_NORMAL + + +# int onig_set_retraction_callout_of_match_param(OnigMatchParam* mp, OnigCalloutFunc f) + +  後退時の内容の呼び出し(callouts)で呼び出される関数をセットする。 +  もし0(NULL)がセットされると、後退時に呼び出しは起こらない。 + +  引数 +  1 mp: マッチパラメタオブジェクトアドレス +  2 f: 呼び出される関数 + +  正常終了戻り値: ONIG_NORMAL + +  # int onig_search(regex_t* reg, const UChar* str, const UChar* end, const UChar* start,                     const UChar* range, OnigRegion* region, OnigOptionType option) @@ -245,6 +316,15 @@      ONIG_OPTION_POSIX_REGION  region引数をPOSIX APIのregmatch_t[]にする +# int onig_search_with_param(regex_t* reg, const UChar* str, const UChar* end, +                   const UChar* start, const UChar* range, OnigRegion* region, +                   OnigOptionType option, OnigMatchParam* mp) + +  引数 +  1-7:  onig_search()と同じ +  8 mp: マッチパラメタ値 (match_stack_limit, retry_limit_in_match) + +  # int onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at,  		 OnigRegion* region, OnigOptionType option) @@ -266,6 +346,15 @@      ONIG_OPTION_POSIX_REGION  region引数をPOSIX APIのregmatch_t[]にする +# int onig_match_with_param(regex_t* reg, const UChar* str, const UChar* end, +                            const UChar* at, OnigRegion* region, +                            OnigOptionType option, OnigMatchParam* mp) + +  引数 +  1-6:  onig_match()と同じ +  7 mp: マッチパラメタ値 (match_stack_limit, retry_limit_in_match) + +  # int onig_scan(regex_t* reg, const UChar* str, const UChar* end,                  OnigRegion* region, OnigOptionType option,                  int (*scan_callback)(int, int, OnigRegion*, void*), @@ -629,6 +718,47 @@    正常終了戻り値: ONIG_NORMAL +# unsigned long onig_get_retry_limit_in_match(void) + +  マッチング関数内でのリトライ数の制限値を返す。 +  (デフォルト: 10000000) + +  正常終了戻り値: 制限値 + + +# int onig_set_retry_limit_in_match(unsigned long n) + +  マッチング関数内でのリトライ数の制限値を指定する。 + +  正常終了戻り値: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_progress_callout(void) + +  前進時の内容の呼び出しで呼び出される関数を返す。 + + +# int onig_set_progress_callout(OnigCalloutFunc f) + +  前進時の内容の呼び出しで呼び出される関数を指定する。 +  もし0(NULL)を指定すると、前進時の内容の呼び出しで呼び出しは起こらない。 + +  正常終了戻り値: ONIG_NORMAL + + +# OnigCalloutFunc onig_get_retraction_callout(void) + +  後退時の内容の呼び出しで呼び出される関数を返す。 + + +# int onig_set_retraction_callout(OnigCalloutFunc f) + +  後退時の内容の呼び出しで呼び出される関数を指定する。 +  もし0(NULL)を指定すると、後退時の内容の呼び出しで呼び出しは起こらない。 + +  正常終了戻り値: ONIG_NORMAL + +  # int onig_unicode_define_user_property(const char* name, OnigCodePoint* ranges))    新しいUnicodeプロパティを定義する。 diff --git a/doc/CALLOUTS.BUILTIN b/doc/CALLOUTS.BUILTIN new file mode 100644 index 0000000..dcf87f8 --- /dev/null +++ b/doc/CALLOUTS.BUILTIN @@ -0,0 +1,88 @@ +CALLOUTS.BUILTIN               2018/03/19 + + +* FAIL    (progress) + +  (*FAIL) + +  Always fail. + + +* MISMATCH    (progress) + +  (*MISMATCH) + +  Terminate Match process. +  Continue Search process. + + +* ERROR    (progress) + +  (*ERROR{n::LONG}) + +  Terminate Search/Match process. + +  Return value is the argument 'n'. (The value must be less than -1) +  'n' is an optional argument. (default value is ONIG_ABORT) + + +* MAX    (progress/retraction) + +  (*MAX{n::LONG}) + +  Restrict the maximum count of success. + +  [callout data] +  slot 0: current success count. + + +* COUNT    (progress/retraction) + +  (*COUNT{c::CHAR}) + +  Counter. +  Depends on 'c' argument, the slot 0 value changes. +  'c' is an optional argument, deefault value is '>'. + +  [callout data] +  slot 0: '>': progress count, '<': retraction count, 'X': success count +  slot 1: progress count +  slot 2: retraction count + +  (* success count = progress count - retraction count) + +  ** If option ONIG_OPTION_FIND_LONGEST or ONIG_OPTION_FIND_NOT_EMPTY is used, +     counts are not accurate. + + +* TOTAL_COUNT    (progress/retraction) + +  (*TOTAL_COUNT{c::CHAR}) + +  It's the almost same as COUNT. +  But the counts are integrated in a search process. +  'c' is an optional argument, deefault value is '>'. + +  [callout data] +  slot 0: '>': progress count, '<': retraction count, 'X': success count +  slot 1: progress count +  slot 2: retraction count + +  ** If option ONIG_OPTION_FIND_LONGEST or ONIG_OPTION_FIND_NOT_EMPTY is used, +     counts are not accurate. + + +* CMP    (progress) + +  (*CMP{x::TAG/LONG, op::STRING, y::TAG/LONG}) + +  Compare x value and y value with op operator. + +  op: '==', '!=', '>', '<', '>=', '<=' + +  ex. "(?:(*MAX[TA]{7})a|(*MAX[TB]{5})b)*(*CMP{TA,>=,4})" + +  [callout data] +  slot 0: op value (enum OP_CMP in src/regexec.c) + +//END diff --git a/doc/CALLOUTS.BUILTIN.ja b/doc/CALLOUTS.BUILTIN.ja new file mode 100644 index 0000000..e1a5b7a --- /dev/null +++ b/doc/CALLOUTS.BUILTIN.ja @@ -0,0 +1,88 @@ +CALLOUTS.BUILTIN.ja               2018/03/19 + + +* FAIL    (前進) + +  (*FAIL) + +  常に失敗する + + +* MISMATCH    (前進) + +  (*MISMATCH) + +  照合を中止する +  検索は継続する + + +* ERROR    (前進) + +  (*ERROR{n::LONG}) + +  検索/照合を中止する +  戻り値は引数'n'の値。(-1より小さい負の値でなければならない) +  'n'はオプション引数で、デフォルト値はONIG_ABORT + + +* MAX    (前進/後退) + +  (*MAX{n::LONG}) + +  成功回数を制限する + +  [callout data] +  slot 0: 現在の成功回数 + + +* COUNT    (前進/後退) + +  (*COUNT{c::CHAR}) + +  カウンタ +  'c'引数の値によって、slot 0の値が変化する +  'c'はオプション引数で、デフォルト値は'>' + +  [callout data] +  slot 0: '>': 前進回数, '<': 後退回数, 'X': 成功回数 +  slot 1: 前進回数 +  slot 2: 後退回数 + +  (* 成功回数 = 前進回数 - 後退回数) + +  ** ONIG_OPTION_FIND_LONGEST または ONIG_OPTION_FIND_NOT_EMPTY が使用されると +     正確な動作ができなくなる + + +* TOTAL_COUNT    (前進/後退) + +  (*TOTAL_COUNT{c::CHAR}) + +  これはCOUNTとほとんど同じ +  しかし、カウントが検索過程で積算される +  'c'はオプション引数で、デフォルト値は'>' + +  [callout data] +  slot 0: '>': 前進回数, '<': 後退回数, 'X': 成功回数 +  slot 1: 前進回数 +  slot 2: 後退回数 + +  ** ONIG_OPTION_FIND_LONGEST または ONIG_OPTION_FIND_NOT_EMPTY が使用されると +     正確な動作ができなくなる + + +* CMP    (前進) + +  (*CMP{x::TAG/LONG, op::STRING, y::TAG/LONG}) + +  xの値とyの値をop演算子で比較する +  x, yがTAGのときにはそのcalloutのslot 0の値が参照される + +  op: '==', '!=', '>', '<', '>=', '<=' + +  例: "(?:(*MAX[TA]{7})a|(*MAX[TB]{5})b)*(*CMP{TA,>=,4})" + +  [callout data] +  slot 0: op値 (src/regexec.c の中の enum OP_CMP) + +//END @@ -1,12 +1,12 @@  FAQ    2006/11/14 -1. Lognest match +1. Longest match -   You can execute longest match by using ONIG_OPTION_FIND_LONGEST option +   You can execute the longest match by using ONIG_OPTION_FIND_LONGEST option     in onig_new().  2. Mailing list -   There is no mailing list about Oniguruma. +   There is no mailing list for Oniguruma.  // END @@ -1,4 +1,4 @@ -Oniguruma Regular Expressions Version 6.7.0    2017/12/08 +Oniguruma Regular Expressions Version 6.8.0    2018/03/08  syntax: ONIG_SYNTAX_ONIGURUMA (default) @@ -262,6 +262,24 @@ syntax: ONIG_SYNTAX_ONIGURUMA (default)                       Assigning the same name to two or more subexps is allowed. + +  <Callouts> + +  * Callouts of contents +  (?{...contents...})         callouts in progress +  (?{...contents...}D)        D is a direction flag char. ('X' or '<' or '>') +                              D = 'X': progress and retraction, '<': retraction only +                              '>': progress only (default) +  (?{...contents...}[tag])    tag assigned +  (?{...contents...}[tag]D) + +  * Callouts of name +  (*name) +  (*name{args...})            with args +  (*name[tag])                tag assigned +  (*name[tag]{args...}) + +    <Absent functions>    (?~absent)         Absent repeater    (* proposed by Tanaka Akira) @@ -289,6 +307,8 @@ syntax: ONIG_SYNTAX_ONIGURUMA (default)         is undefined. +  <if-then-else> +    (?(condition_exp)then_exp|else_exp)    if-then-else    (?(condition_exp)then_exp)             if-then @@ -1,4 +1,4 @@ -鬼車 正規表現 Version 6.7.0    2017/12/08 +鬼車 正規表現 Version 6.8.0    2018/03/08  使用文法: ONIG_SYNTAX_ONIGURUMA (既定値) @@ -264,10 +264,28 @@                      この場合には、この名前を使用した後方参照は可能であるが、                      部分式呼出しはできない。 + +  <呼び出し> + +  * 内容の呼び出し +  (?{...contents...})           前進中のみの呼び出し +  (?{...contents...}D)          Dは方向指定文字 ('X' or '<' or '>') +                                D = 'X': 前進および後退,  '<' 後退のみ, '>': 前進のみ +  (?{...contents...}[tag])      名札付き +  (?{...contents...}[tag]D) + +  * 名前の呼び出し +  (*name) +  (*name{args...})         引数付き +  (*name[tag])             名札付き +  (*name[tag]{args...}) + + +    <不在機能群>    (?~不在式)        不在繰り返し  (*原案 田中哲) -                    これは.*(より正確には\O*)のように動作するが、<不在式>に +                    これは .*(より正確には\O*)のように動作するが、<不在式>に                      適合する文字列を含まない範囲に制限される。                      これは(?~|不在式|\O*)の省略表記である。 @@ -282,10 +300,13 @@                      <不在式>に適合する文字列を含まない範囲に制限される。    (?~|)             範囲消去 -                    不在停止の効果を消して、初期状態にする。 +                    不在停止の効果を消して、それ以前の状態にする。 + +     * 不在機能の入れ子には対応しておらず、その場合の挙動は不定とする。 + -     * 不在機能の入れ子には対応しておらず、挙動は不定とする。 +  <条件文>    (?(条件式)成功式|失敗式)    条件式が成功すれば成功式、失敗すれば失敗式を実行する                               この機能の存在理由は、成功式が失敗しても失敗式には | 
