]> granicus.if.org Git - onig/commitdiff
fix doc/SYNTAX.md
authorK.Kosako <kkosako0@gmail.com>
Mon, 25 Mar 2019 08:11:24 +0000 (17:11 +0900)
committerK.Kosako <kkosako0@gmail.com>
Mon, 25 Mar 2019 08:11:24 +0000 (17:11 +0900)
doc/SYNTAX.md

index ec98483f063762e5f79750d4275dfc27df066c66..eb5db57822bb9db9b25382074bc165e8a56f37ea 100644 (file)
@@ -1,7 +1,7 @@
 \r
 # Oniguruma syntax (operator) configuration\r
 \r
-_Documented for Oniguruma 6.9.1_\r
+_Documented for Oniguruma 6.9.1 (2019/03/25)_\r
 \r
 \r
 ----------\r
@@ -174,7 +174,7 @@ Enables support for the common `r|s` alternation operator.  You usually want thi
 flag set.\r
 \r
 \r
-### 11. ONIG_SYN_OP_VBAR_ALT (enable `\|`)\r
+### 11. ONIG_SYN_OP_ESC_VBAR_ALT (enable `\|`)\r
 \r
 _Set in: Emacs, Grep_\r
 \r
@@ -475,7 +475,7 @@ before matching `b`, while `a(?-i)b` will turn off case-insensitivity in
 the same location.  The supported toggle-able options for this flag are:\r
 \r
   - `i` - Case-insensitivity\r
-  - `m` - Multi-line mode (`^` and `$` match at `\n` as well as start/end of buffer)\r
+  - `m` - Multi-line mode (`.` can match `\n`)\r
   - `x` - Extended pattern (free-formatting: whitespace will ignored)\r
 \r
 \r
@@ -665,16 +665,15 @@ You usually do not want this flag to be enabled.
 _Set in: Perl, Perl_NG, Ruby, Oniguruma_\r
 \r
 Enables support for conditional inclusion of subsequent regex patterns based on whether\r
-a prior named or numbered capture matched, or based on whether a lookhead pattern will\r
+a prior named or numbered capture matched, or based on whether a pattern will\r
 match.  This supports many different forms, including:\r
 \r
-  - `(?(foo)then|else)` - condition based on a capture by name.\r
   - `(?(<foo>)then|else)` - condition based on a capture by name.\r
   - `(?('foo')then|else)` - condition based on a capture by name.\r
   - `(?(3)then|else)` - condition based on a capture by number.\r
   - `(?(+3)then|else)` - forward conditional to a future match, by relative position.\r
   - `(?(-3)then|else)` - backward conditional to a prior match, by relative position.\r
-  - `(?(foo)then|else)` - if there is no capture named `foo`, this matches a literal pattern `foo` as lookahead.\r
+  - `(?(foo)then|else)` - this matches a pattern `foo`. (foo is any sub-expression)\r
 \r
 (New feature as of Oniguruma 6.5.)\r
 \r
@@ -948,10 +947,8 @@ will be silently discarded.
 \r
 _Set in: Ruby, Oniguruma_\r
 \r
-If this flag is set, Oniguruma will warn about nested repeat operators that may cause\r
-significant performance problems, like `(?:a*)+`, which has extremely poor _O(n²)_ growth\r
-and may take an extremely long time to match.  If this flag is clear, Oniguruma will\r
-allow the nested repeat operators without warning about them.\r
+If this flag is set, Oniguruma will warn about nested repeat operators those have no meaning, like `(?:a*)+`.\r
+If this flag is clear, Oniguruma will allow the nested repeat operators without warning about them.\r
 \r
 ### 31. ONIG_SYN_CONTEXT_INDEP_ANCHORS\r
 \r