]> granicus.if.org Git - onig/commitdiff
Update introduction to documentation.
authorSean Werkema <sean@werkema.com>
Sun, 17 Mar 2019 05:23:59 +0000 (01:23 -0400)
committerSean Werkema <sean@werkema.com>
Sun, 17 Mar 2019 05:23:59 +0000 (01:23 -0400)
doc/OnigurumaSyntax.md

index 6a031f4c84b57eb2d79a0d2ffcb7fd84253164fa..18ca16405175175775c7b6176145c4a9133d4e06 100644 (file)
@@ -9,6 +9,10 @@ _Documented for Oniguruma 6.9.1_
 \r
 ## Overview\r
 \r
+This document details how to configure Oniguruma's syntax, by describing the desired\r
+syntax operators and behaviors in an instance of the OnigSyntaxType struct, just like\r
+the built-in Oniguruma syntaxes do.\r
+\r
 Configuration operators are bit flags, and are broken into multiple groups, somewhat arbitrarily,\r
 because Oniguruma takes its configuration as a trio of 32-bit `unsigned int` values, assigned as\r
 the first three fields in an `OnigSyntaxType` struct:\r
@@ -27,7 +31,16 @@ The first group of configuration flags (`op`) roughly corresponds to the
 configuration for "basic regex."  The second group (`op2`) roughly corresponds\r
 to the configuration for "advanced regex."  And the third group (`behavior`)\r
 describes more-or-less what to do for broken input, bad input, or other corner-case\r
-regular expressions whose meaning is not well-defined.\r
+regular expressions whose meaning is not well-defined.  These three groups of\r
+flags are described in full below, and tables of their usages for various syntaxes\r
+follow.\r
+\r
+The `options` field describes the default compile options to use if the caller does\r
+not specify any options when invoking `onig_new()`.\r
+\r
+The `meta_char_table` field is used exclusively by the ONIG_SYN_OP_VARIABLE_META_CHARACTERS\r
+option, which allows the various regex metacharacters, like `*` and `?`, to be replaced\r
+with alternates (for example, SQL typically uses `%` instead of `.*` and `_` instead of `?`).\r
 \r
 \r
 ----------\r