@port-labs/jq-node-bindings 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/binding.gyp +3 -3
  2. package/configure +8 -6
  3. package/deps/jq/.travis.yml +184 -35
  4. package/deps/jq/AUTHORS +31 -30
  5. package/deps/jq/COPYING +2 -2
  6. package/deps/jq/KEYS +8 -0
  7. package/deps/jq/Makefile.am +85 -70
  8. package/deps/jq/NEWS +5 -4
  9. package/deps/jq/README.md +18 -9
  10. package/deps/jq/appveyor.yml +53 -0
  11. package/deps/jq/compile-ios.sh +5 -5
  12. package/deps/jq/config/m4/check-math-func.m4 +7 -2
  13. package/deps/jq/configure.ac +130 -68
  14. package/deps/jq/docs/Rakefile +14 -135
  15. package/deps/jq/docs/Rakefile.manual +49 -0
  16. package/deps/jq/docs/Rakefile.website +76 -0
  17. package/deps/jq/docs/content/2.download/default.yml +115 -39
  18. package/deps/jq/docs/content/3.manual/manual.yml +641 -231
  19. package/deps/jq/docs/content/3.manual/v1.3/manual.yml +130 -130
  20. package/deps/jq/docs/content/3.manual/v1.4/manual.yml +160 -160
  21. package/deps/jq/docs/content/3.manual/v1.5/manual.yml +2878 -0
  22. package/deps/jq/docs/content/3.manual/v1.6/manual.yml +3287 -0
  23. package/deps/jq/docs/content/index/index.yml +28 -6
  24. package/deps/jq/docs/public/.htaccess +2 -2
  25. package/deps/jq/docs/public/css/base.scss +141 -59
  26. package/deps/jq/docs/public/js/manual-search.js +52 -0
  27. package/deps/jq/docs/site.yml +1 -10
  28. package/deps/jq/docs/templates/default.liquid +10 -10
  29. package/deps/jq/docs/templates/index.liquid +45 -32
  30. package/deps/jq/docs/templates/manual.liquid +67 -90
  31. package/deps/jq/docs/templates/shared/_footer.liquid +10 -5
  32. package/deps/jq/docs/templates/shared/_head.liquid +17 -12
  33. package/deps/jq/docs/templates/shared/_navbar.liquid +27 -0
  34. package/deps/jq/jq.1.prebuilt +523 -139
  35. package/deps/jq/modules/oniguruma/AUTHORS +1 -0
  36. package/deps/jq/modules/oniguruma/CMakeLists.txt +86 -0
  37. package/deps/jq/modules/oniguruma/COPYING +28 -0
  38. package/deps/jq/modules/oniguruma/ChangeLog +0 -0
  39. package/deps/jq/modules/oniguruma/HISTORY +2138 -0
  40. package/deps/jq/modules/oniguruma/Makefile.am +33 -0
  41. package/deps/jq/modules/oniguruma/NEWS +0 -0
  42. package/deps/jq/modules/oniguruma/README +189 -0
  43. package/deps/jq/modules/oniguruma/README.ja +195 -0
  44. package/deps/jq/modules/oniguruma/README.md +203 -0
  45. package/deps/jq/modules/oniguruma/cmake/dist.cmake +321 -0
  46. package/deps/jq/modules/oniguruma/compile +348 -0
  47. package/deps/jq/modules/oniguruma/config.guess +1754 -0
  48. package/deps/jq/modules/oniguruma/config.sub +1890 -0
  49. package/deps/jq/modules/oniguruma/configure.ac +87 -0
  50. package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +31 -0
  51. package/deps/jq/modules/oniguruma/depcomp +791 -0
  52. package/deps/jq/modules/oniguruma/dist.info +10 -0
  53. package/deps/jq/modules/oniguruma/doc/API +660 -0
  54. package/deps/jq/modules/oniguruma/doc/API.ja +667 -0
  55. package/deps/jq/modules/oniguruma/doc/FAQ +12 -0
  56. package/deps/jq/modules/oniguruma/doc/FAQ.ja +22 -0
  57. package/deps/jq/modules/oniguruma/doc/RE +436 -0
  58. package/deps/jq/modules/oniguruma/doc/RE.ja +448 -0
  59. package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +698 -0
  60. package/deps/jq/modules/oniguruma/index.html +181 -0
  61. package/deps/jq/modules/oniguruma/index_ja.html +184 -0
  62. package/deps/jq/modules/oniguruma/install-sh +541 -0
  63. package/deps/jq/modules/oniguruma/m4/.whatever +0 -0
  64. package/deps/jq/modules/oniguruma/make_win32.bat +3 -0
  65. package/deps/jq/modules/oniguruma/make_win64.bat +3 -0
  66. package/deps/jq/modules/oniguruma/missing +215 -0
  67. package/deps/jq/modules/oniguruma/onig-config.in +78 -0
  68. package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +13 -0
  69. package/deps/jq/modules/oniguruma/oniguruma.pc.in +14 -0
  70. package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +28 -0
  71. package/deps/jq/modules/oniguruma/sample/Makefile.am +34 -0
  72. package/deps/jq/modules/oniguruma/sample/bug_fix.c +131 -0
  73. package/deps/jq/modules/oniguruma/sample/crnl.c +127 -0
  74. package/deps/jq/modules/oniguruma/sample/encode.c +308 -0
  75. package/deps/jq/modules/oniguruma/sample/listcap.c +110 -0
  76. package/deps/jq/modules/oniguruma/sample/names.c +75 -0
  77. package/deps/jq/modules/oniguruma/sample/posix.c +96 -0
  78. package/deps/jq/modules/oniguruma/sample/scan.c +88 -0
  79. package/deps/jq/modules/oniguruma/sample/simple.c +59 -0
  80. package/deps/jq/modules/oniguruma/sample/sql.c +76 -0
  81. package/deps/jq/modules/oniguruma/sample/syntax.c +76 -0
  82. package/deps/jq/modules/oniguruma/sample/user_property.c +87 -0
  83. package/deps/jq/modules/oniguruma/src/Makefile.am +58 -0
  84. package/deps/jq/modules/oniguruma/src/Makefile.windows +183 -0
  85. package/deps/jq/modules/oniguruma/src/ascii.c +61 -0
  86. package/deps/jq/modules/oniguruma/src/big5.c +190 -0
  87. package/deps/jq/modules/oniguruma/src/config.h.cmake.in +71 -0
  88. package/deps/jq/modules/oniguruma/src/config.h.win32 +84 -0
  89. package/deps/jq/modules/oniguruma/src/config.h.win64 +84 -0
  90. package/deps/jq/modules/oniguruma/src/cp1251.c +203 -0
  91. package/deps/jq/modules/oniguruma/src/euc_jp.c +310 -0
  92. package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +158 -0
  93. package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +27 -0
  94. package/deps/jq/modules/oniguruma/src/euc_kr.c +188 -0
  95. package/deps/jq/modules/oniguruma/src/euc_tw.c +171 -0
  96. package/deps/jq/modules/oniguruma/src/gb18030.c +538 -0
  97. package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +67 -0
  98. package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +55 -0
  99. package/deps/jq/modules/oniguruma/src/iso8859_1.c +275 -0
  100. package/deps/jq/modules/oniguruma/src/iso8859_10.c +242 -0
  101. package/deps/jq/modules/oniguruma/src/iso8859_11.c +99 -0
  102. package/deps/jq/modules/oniguruma/src/iso8859_13.c +231 -0
  103. package/deps/jq/modules/oniguruma/src/iso8859_14.c +244 -0
  104. package/deps/jq/modules/oniguruma/src/iso8859_15.c +238 -0
  105. package/deps/jq/modules/oniguruma/src/iso8859_16.c +240 -0
  106. package/deps/jq/modules/oniguruma/src/iso8859_2.c +238 -0
  107. package/deps/jq/modules/oniguruma/src/iso8859_3.c +238 -0
  108. package/deps/jq/modules/oniguruma/src/iso8859_4.c +240 -0
  109. package/deps/jq/modules/oniguruma/src/iso8859_5.c +229 -0
  110. package/deps/jq/modules/oniguruma/src/iso8859_6.c +99 -0
  111. package/deps/jq/modules/oniguruma/src/iso8859_7.c +225 -0
  112. package/deps/jq/modules/oniguruma/src/iso8859_8.c +99 -0
  113. package/deps/jq/modules/oniguruma/src/iso8859_9.c +231 -0
  114. package/deps/jq/modules/oniguruma/src/koi8.c +253 -0
  115. package/deps/jq/modules/oniguruma/src/koi8_r.c +215 -0
  116. package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +22 -0
  117. package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +306 -0
  118. package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +18 -0
  119. package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +545 -0
  120. package/deps/jq/modules/oniguruma/src/mktable.c +1184 -0
  121. package/deps/jq/modules/oniguruma/src/onig_init.c +45 -0
  122. package/deps/jq/modules/oniguruma/src/oniggnu.h +85 -0
  123. package/deps/jq/modules/oniguruma/src/onigposix.h +169 -0
  124. package/deps/jq/modules/oniguruma/src/oniguruma.h +841 -0
  125. package/deps/jq/modules/oniguruma/src/regcomp.c +6300 -0
  126. package/deps/jq/modules/oniguruma/src/regenc.c +917 -0
  127. package/deps/jq/modules/oniguruma/src/regenc.h +243 -0
  128. package/deps/jq/modules/oniguruma/src/regerror.c +393 -0
  129. package/deps/jq/modules/oniguruma/src/regexec.c +3856 -0
  130. package/deps/jq/modules/oniguruma/src/regext.c +202 -0
  131. package/deps/jq/modules/oniguruma/src/reggnu.c +147 -0
  132. package/deps/jq/modules/oniguruma/src/regint.h +779 -0
  133. package/deps/jq/modules/oniguruma/src/regparse.c +5403 -0
  134. package/deps/jq/modules/oniguruma/src/regparse.h +351 -0
  135. package/deps/jq/modules/oniguruma/src/regposerr.c +105 -0
  136. package/deps/jq/modules/oniguruma/src/regposix.c +306 -0
  137. package/deps/jq/modules/oniguruma/src/regsyntax.c +315 -0
  138. package/deps/jq/modules/oniguruma/src/regtrav.c +76 -0
  139. package/deps/jq/modules/oniguruma/src/regversion.c +57 -0
  140. package/deps/jq/modules/oniguruma/src/sjis.c +341 -0
  141. package/deps/jq/modules/oniguruma/src/sjis_prop.c +158 -0
  142. package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +27 -0
  143. package/deps/jq/modules/oniguruma/src/st.c +589 -0
  144. package/deps/jq/modules/oniguruma/src/st.h +68 -0
  145. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +2250 -0
  146. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +203 -0
  147. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +113 -0
  148. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +1225 -0
  149. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +24742 -0
  150. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +4846 -0
  151. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +2571 -0
  152. package/deps/jq/modules/oniguruma/src/unicode.c +664 -0
  153. package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +2548 -0
  154. package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +203 -0
  155. package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +113 -0
  156. package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1366 -0
  157. package/deps/jq/modules/oniguruma/src/unicode_property_data.c +25306 -0
  158. package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +4940 -0
  159. package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +2854 -0
  160. package/deps/jq/modules/oniguruma/src/utf16_be.c +235 -0
  161. package/deps/jq/modules/oniguruma/src/utf16_le.c +245 -0
  162. package/deps/jq/modules/oniguruma/src/utf32_be.c +194 -0
  163. package/deps/jq/modules/oniguruma/src/utf32_le.c +194 -0
  164. package/deps/jq/modules/oniguruma/src/utf8.c +335 -0
  165. package/deps/jq/modules/oniguruma/test/Makefile.am +28 -0
  166. package/deps/jq/modules/oniguruma/test/testc.c +874 -0
  167. package/deps/jq/modules/oniguruma/test/testu.c +916 -0
  168. package/deps/jq/modules/oniguruma/test-driver +153 -0
  169. package/deps/jq/modules/oniguruma/windows/testc.c +869 -0
  170. package/deps/jq/scripts/crosscompile +2 -1
  171. package/deps/jq/scripts/gen_utf8_tables.py +2 -3
  172. package/deps/jq/scripts/update-website +29 -0
  173. package/deps/jq/scripts/version +7 -2
  174. package/deps/jq/sig/jq-release.key +41 -0
  175. package/deps/jq/sig/v1.3/jq-linux-x86.asc +17 -0
  176. package/deps/jq/sig/v1.3/jq-linux-x86_64.asc +17 -0
  177. package/deps/jq/sig/v1.3/jq-osx-x86.asc +17 -0
  178. package/deps/jq/sig/v1.3/jq-osx-x86_64.asc +17 -0
  179. package/deps/jq/sig/v1.3/jq-win32.exe.asc +17 -0
  180. package/deps/jq/sig/v1.3/jq-win64.exe.asc +17 -0
  181. package/deps/jq/sig/v1.3/sha256sum.txt +6 -0
  182. package/deps/jq/sig/v1.4/jq-linux-x86.asc +17 -0
  183. package/deps/jq/sig/v1.4/jq-linux-x86_64.asc +17 -0
  184. package/deps/jq/sig/v1.4/jq-osx-x86.asc +17 -0
  185. package/deps/jq/sig/v1.4/jq-osx-x86_64.asc +17 -0
  186. package/deps/jq/sig/v1.4/jq-solaris11-32.asc +17 -0
  187. package/deps/jq/sig/v1.4/jq-solaris11-64.asc +17 -0
  188. package/deps/jq/sig/v1.4/jq-win32.exe.asc +17 -0
  189. package/deps/jq/sig/v1.4/jq-win64.exe.asc +17 -0
  190. package/deps/jq/sig/v1.4/sha256sum.txt +8 -0
  191. package/deps/jq/sig/v1.5/jq-linux32-no-oniguruma.asc +17 -0
  192. package/deps/jq/sig/v1.5/jq-linux32.asc +17 -0
  193. package/deps/jq/sig/v1.5/jq-linux64.asc +17 -0
  194. package/deps/jq/sig/v1.5/jq-osx-amd64.asc +17 -0
  195. package/deps/jq/sig/v1.5/jq-win32.exe.asc +17 -0
  196. package/deps/jq/sig/v1.5/jq-win64.exe.asc +17 -0
  197. package/deps/jq/sig/v1.5/sha256sum.txt +5 -0
  198. package/deps/jq/sig/v1.5rc1/jq-linux-x86_64-static.asc +17 -0
  199. package/deps/jq/sig/v1.5rc1/jq-win32.exe.asc +17 -0
  200. package/deps/jq/sig/v1.5rc1/jq-win64.exe.asc +17 -0
  201. package/deps/jq/sig/v1.5rc1/sha256sum.txt +3 -0
  202. package/deps/jq/sig/v1.5rc2/jq-linux-x86.asc +17 -0
  203. package/deps/jq/sig/v1.5rc2/jq-linux-x86_64.asc +17 -0
  204. package/deps/jq/sig/v1.5rc2/jq-osx-x86_64.asc +17 -0
  205. package/deps/jq/sig/v1.5rc2/jq-win32.exe.asc +17 -0
  206. package/deps/jq/sig/v1.5rc2/jq-win64.exe.asc +17 -0
  207. package/deps/jq/sig/v1.5rc2/sha256sum.txt +5 -0
  208. package/deps/jq/sig/v1.6/jq-linux32.asc +16 -0
  209. package/deps/jq/sig/v1.6/jq-linux64.asc +16 -0
  210. package/deps/jq/sig/v1.6/jq-osx-amd64.asc +16 -0
  211. package/deps/jq/sig/v1.6/jq-win32.exe.asc +16 -0
  212. package/deps/jq/sig/v1.6/jq-win64.exe.asc +16 -0
  213. package/deps/jq/sig/v1.6/sha256sum.txt +5 -0
  214. package/deps/jq/{builtin.c → src/builtin.c} +449 -344
  215. package/deps/jq/{builtin.h → src/builtin.h} +0 -0
  216. package/deps/jq/src/builtin.jq +311 -0
  217. package/deps/jq/{bytecode.c → src/bytecode.c} +0 -0
  218. package/deps/jq/{bytecode.h → src/bytecode.h} +0 -0
  219. package/deps/jq/{compile.c → src/compile.c} +213 -37
  220. package/deps/jq/{compile.h → src/compile.h} +7 -2
  221. package/deps/jq/{exec_stack.h → src/exec_stack.h} +0 -0
  222. package/deps/jq/{execute.c → src/execute.c} +127 -24
  223. package/deps/jq/{inject_errors.c → src/inject_errors.c} +0 -0
  224. package/deps/jq/{jq.h → src/jq.h} +13 -2
  225. package/deps/jq/{jq_parser.h → src/jq_parser.h} +0 -0
  226. package/deps/jq/{jq_test.c → src/jq_test.c} +1 -1
  227. package/deps/jq/{jv.c → src/jv.c} +24 -5
  228. package/deps/jq/{jv.h → src/jv.h} +46 -11
  229. package/deps/jq/{jv_alloc.c → src/jv_alloc.c} +0 -0
  230. package/deps/jq/{jv_alloc.h → src/jv_alloc.h} +0 -0
  231. package/deps/jq/{jv_aux.c → src/jv_aux.c} +38 -14
  232. package/deps/jq/{jv_dtoa.c → src/jv_dtoa.c} +4 -5
  233. package/deps/jq/{jv_dtoa.h → src/jv_dtoa.h} +0 -0
  234. package/deps/jq/src/jv_file.c +81 -0
  235. package/deps/jq/{jv_parse.c → src/jv_parse.c} +8 -2
  236. package/deps/jq/{jv_print.c → src/jv_print.c} +80 -27
  237. package/deps/jq/{jv_unicode.c → src/jv_unicode.c} +28 -4
  238. package/deps/jq/{jv_unicode.h → src/jv_unicode.h} +1 -0
  239. package/deps/jq/{jv_utf8_tables.h → src/jv_utf8_tables.h} +0 -0
  240. package/deps/jq/{lexer.c → src/lexer.c} +317 -292
  241. package/deps/jq/{lexer.h → src/lexer.h} +16 -12
  242. package/deps/jq/{lexer.l → src/lexer.l} +5 -4
  243. package/deps/jq/src/libm.h +291 -0
  244. package/deps/jq/{linker.c → src/linker.c} +5 -3
  245. package/deps/jq/{linker.h → src/linker.h} +0 -0
  246. package/deps/jq/{locfile.c → src/locfile.c} +1 -1
  247. package/deps/jq/{locfile.h → src/locfile.h} +0 -0
  248. package/deps/jq/{main.c → src/main.c} +202 -100
  249. package/deps/jq/{opcode_list.h → src/opcode_list.h} +4 -0
  250. package/deps/jq/{parser.c → src/parser.c} +1149 -1069
  251. package/deps/jq/{parser.h → src/parser.h} +28 -24
  252. package/deps/jq/{parser.y → src/parser.y} +108 -52
  253. package/deps/jq/{util.c → src/util.c} +12 -9
  254. package/deps/jq/{util.h → src/util.h} +0 -0
  255. package/deps/jq/tests/base64.test +35 -0
  256. package/deps/jq/tests/base64test +5 -0
  257. package/deps/jq/tests/jq-f-test.sh +4 -0
  258. package/deps/jq/tests/jq.test +305 -21
  259. package/deps/jq/tests/jqtest +1 -1
  260. package/deps/jq/tests/mantest +1 -1
  261. package/deps/jq/tests/onig.test +13 -0
  262. package/deps/jq/tests/onigtest +1 -1
  263. package/deps/jq/tests/optional.test +20 -0
  264. package/deps/jq/tests/optionaltest +5 -0
  265. package/deps/jq/tests/setup +7 -1
  266. package/deps/jq/tests/shtest +133 -29
  267. package/deps/jq/tests/utf8-truncate.jq +3 -0
  268. package/deps/jq/tests/utf8test +10 -0
  269. package/lib/index.js +7 -1
  270. package/package.json +3 -3
  271. package/test/santiy.test.js +24 -0
  272. package/deps/jq/docs/default_manpage.md +0 -22
  273. package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.css +0 -1058
  274. package/deps/jq/docs/public/bootstrap/css/bootstrap-responsive.min.css +0 -9
  275. package/deps/jq/docs/public/bootstrap/css/bootstrap.css +0 -5224
  276. package/deps/jq/docs/public/bootstrap/css/bootstrap.min.css +0 -9
  277. package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings-white.png +0 -0
  278. package/deps/jq/docs/public/bootstrap/img/glyphicons-halflings.png +0 -0
  279. package/deps/jq/docs/public/bootstrap/js/bootstrap.js +0 -2027
  280. package/deps/jq/docs/public/bootstrap/js/bootstrap.min.js +0 -6
  281. package/deps/jq/docs/templates/shared/_header.liquid +0 -26
  282. package/deps/jq/jq.1.default +0 -39
  283. package/deps/jq/jv_file.c +0 -49
  284. package/deps/jq/libm.h +0 -160
  285. package/deps/jq/setup.sh +0 -33
  286. package/reports/jest-port-api.xml +0 -35
@@ -0,0 +1,436 @@
1
+ Oniguruma Regular Expressions Version 6.0.0 2016/08/18
2
+
3
+ syntax: ONIG_SYNTAX_RUBY (default)
4
+
5
+
6
+ 1. Syntax elements
7
+
8
+ \ escape (enable or disable meta character)
9
+ | alternation
10
+ (...) group
11
+ [...] character class
12
+
13
+
14
+ 2. Characters
15
+
16
+ \t horizontal tab (0x09)
17
+ \v vertical tab (0x0B)
18
+ \n newline (line feed) (0x0A)
19
+ \r carriage return (0x0D)
20
+ \b backspace (0x08)
21
+ \f form feed (0x0C)
22
+ \a bell (0x07)
23
+ \e escape (0x1B)
24
+ \nnn octal char (encoded byte value)
25
+ \xHH hexadecimal char (encoded byte value)
26
+ \x{7HHHHHHH} wide hexadecimal char (character code point value)
27
+ \cx control char (character code point value)
28
+ \C-x control char (character code point value)
29
+ \M-x meta (x|0x80) (character code point value)
30
+ \M-\C-x meta control char (character code point value)
31
+
32
+ (* \b as backspace is effective in character class only)
33
+
34
+
35
+ 3. Character types
36
+
37
+ . any character (except newline)
38
+
39
+ \w word character
40
+
41
+ Not Unicode:
42
+ alphanumeric, "_" and multibyte char.
43
+
44
+ Unicode:
45
+ General_Category -- (Letter|Mark|Number|Connector_Punctuation)
46
+
47
+ \W non-word char
48
+
49
+ \s whitespace char
50
+
51
+ Not Unicode:
52
+ \t, \n, \v, \f, \r, \x20
53
+
54
+ Unicode:
55
+ 0009, 000A, 000B, 000C, 000D, 0085(NEL),
56
+ General_Category -- Line_Separator
57
+ -- Paragraph_Separator
58
+ -- Space_Separator
59
+
60
+ \S non-whitespace char
61
+
62
+ \d decimal digit char
63
+
64
+ Unicode: General_Category -- Decimal_Number
65
+
66
+ \D non-decimal-digit char
67
+
68
+ \h hexadecimal digit char [0-9a-fA-F]
69
+
70
+ \H non-hexdigit char
71
+
72
+
73
+ Character Property
74
+
75
+ * \p{property-name}
76
+ * \p{^property-name} (negative)
77
+ * \P{property-name} (negative)
78
+
79
+ property-name:
80
+
81
+ + works on all encodings
82
+ Alnum, Alpha, Blank, Cntrl, Digit, Graph, Lower,
83
+ Print, Punct, Space, Upper, XDigit, Word, ASCII
84
+
85
+ + works on EUC_JP, Shift_JIS
86
+ Hiragana, Katakana
87
+
88
+ + works on UTF8, UTF16, UTF32
89
+ See doc/UNICODE_PROPERTIES.
90
+
91
+
92
+
93
+ 4. Quantifier
94
+
95
+ greedy
96
+
97
+ ? 1 or 0 times
98
+ * 0 or more times
99
+ + 1 or more times
100
+ {n,m} at least n but no more than m times
101
+ {n,} at least n times
102
+ {,n} at least 0 but no more than n times ({0,n})
103
+ {n} n times
104
+
105
+ reluctant
106
+
107
+ ?? 1 or 0 times
108
+ *? 0 or more times
109
+ +? 1 or more times
110
+ {n,m}? at least n but not more than m times
111
+ {n,}? at least n times
112
+ {,n}? at least 0 but not more than n times (== {0,n}?)
113
+
114
+ possessive (greedy and does not backtrack once match)
115
+
116
+ ?+ 1 or 0 times
117
+ *+ 0 or more times
118
+ ++ 1 or more times
119
+
120
+ ({n,m}+, {n,}+, {n}+ are possessive op. in ONIG_SYNTAX_JAVA only)
121
+
122
+ ex. /a*+/ === /(?>a*)/
123
+
124
+
125
+ 5. Anchors
126
+
127
+ ^ beginning of the line
128
+ $ end of the line
129
+ \b word boundary
130
+ \B non-word boundary
131
+ \A beginning of string
132
+ \Z end of string, or before newline at the end
133
+ \z end of string
134
+ \G where the current search attempt begins
135
+
136
+
137
+ 6. Character class
138
+
139
+ ^... negative class (lowest precedence)
140
+ x-y range from x to y
141
+ [...] set (character class in character class)
142
+ ..&&.. intersection (low precedence, only higher than ^)
143
+
144
+ ex. [a-w&&[^c-g]z] ==> ([a-w] AND ([^c-g] OR z)) ==> [abh-w]
145
+
146
+ * If you want to use '[', '-', or ']' as a normal character
147
+ in character class, you should escape them with '\'.
148
+
149
+
150
+ POSIX bracket ([:xxxxx:], negate [:^xxxxx:])
151
+
152
+ Not Unicode Case:
153
+
154
+ alnum alphabet or digit char
155
+ alpha alphabet
156
+ ascii code value: [0 - 127]
157
+ blank \t, \x20
158
+ cntrl
159
+ digit 0-9
160
+ graph include all of multibyte encoded characters
161
+ lower
162
+ print include all of multibyte encoded characters
163
+ punct
164
+ space \t, \n, \v, \f, \r, \x20
165
+ upper
166
+ xdigit 0-9, a-f, A-F
167
+ word alphanumeric, "_" and multibyte characters
168
+
169
+
170
+ Unicode Case:
171
+
172
+ alnum Letter | Mark | Decimal_Number
173
+ alpha Letter | Mark
174
+ ascii 0000 - 007F
175
+ blank Space_Separator | 0009
176
+ cntrl Control | Format | Unassigned | Private_Use | Surrogate
177
+ digit Decimal_Number
178
+ graph [[:^space:]] && ^Control && ^Unassigned && ^Surrogate
179
+ lower Lowercase_Letter
180
+ print [[:graph:]] | [[:space:]]
181
+ punct Connector_Punctuation | Dash_Punctuation | Close_Punctuation |
182
+ Final_Punctuation | Initial_Punctuation | Other_Punctuation |
183
+ Open_Punctuation
184
+ space Space_Separator | Line_Separator | Paragraph_Separator |
185
+ 0009 | 000A | 000B | 000C | 000D | 0085
186
+ upper Uppercase_Letter
187
+ xdigit 0030 - 0039 | 0041 - 0046 | 0061 - 0066
188
+ (0-9, a-f, A-F)
189
+ word Letter | Mark | Decimal_Number | Connector_Punctuation
190
+
191
+
192
+
193
+ 7. Extended groups
194
+
195
+ (?#...) comment
196
+
197
+ (?imx-imx) option on/off
198
+ i: ignore case
199
+ m: multi-line (dot (.) also matches newline)
200
+ x: extended form
201
+ (?imx-imx:subexp) option on/off for subexp
202
+
203
+ (?:subexp) non-capturing group
204
+ (subexp) capturing group
205
+
206
+ (?=subexp) look-ahead
207
+ (?!subexp) negative look-ahead
208
+ (?<=subexp) look-behind
209
+ (?<!subexp) negative look-behind
210
+
211
+ Subexp of look-behind must be fixed-width.
212
+ But top-level alternatives can be of various lengths.
213
+ ex. (?<=a|bc) is OK. (?<=aaa(?:b|cd)) is not allowed.
214
+
215
+ In negative look-behind, capturing group isn't allowed,
216
+ but non-capturing group (?:) is allowed.
217
+
218
+ (?>subexp) atomic group
219
+ no backtracks in subexp.
220
+
221
+ (?<name>subexp), (?'name'subexp)
222
+ define named group
223
+ (Each character of the name must be a word character.)
224
+
225
+ Not only a name but a number is assigned like a capturing
226
+ group.
227
+
228
+ Assigning the same name to two or more subexps is allowed.
229
+
230
+
231
+ 8. Backreferences
232
+
233
+ When we say "backreference a group," it actually means, "re-match the same
234
+ text matched by the subexp in that group."
235
+
236
+ \n \k<n> \k'n' (n >= 1) backreference the nth group in the regexp
237
+ \k<-n> \k'-n' (n >= 1) backreference the nth group counting
238
+ backwards from the referring position
239
+ \k<name> \k'name' backreference a group with the specified name
240
+
241
+ When backreferencing with a name that is assigned to more than one groups,
242
+ the last group with the name is checked first, if not matched then the
243
+ previous one with the name, and so on, until there is a match.
244
+
245
+ * Backreference by number is forbidden if any named group is defined and
246
+ ONIG_OPTION_CAPTURE_GROUP is not set.
247
+
248
+
249
+ backreference with recursion level
250
+
251
+ (n >= 1, level >= 0)
252
+
253
+ \k<n+level> \k'n+level'
254
+ \k<n-level> \k'n-level'
255
+
256
+ \k<name+level> \k'name+level'
257
+ \k<name-level> \k'name-level'
258
+
259
+ Destine a group on the recursion level relative to the referring position.
260
+
261
+ ex 1.
262
+
263
+ /\A(?<a>|.|(?:(?<b>.)\g<a>\k<b>))\z/.match("reee")
264
+ /\A(?<a>|.|(?:(?<b>.)\g<a>\k<b+0>))\z/.match("reer")
265
+
266
+ \k<b+0> refers to the (?<b>.) on the same recursion level with it.
267
+
268
+ ex 2.
269
+
270
+ r = Regexp.compile(<<'__REGEXP__'.strip, Regexp::EXTENDED)
271
+ (?<element> \g<stag> \g<content>* \g<etag> ){0}
272
+ (?<stag> < \g<name> \s* > ){0}
273
+ (?<name> [a-zA-Z_:]+ ){0}
274
+ (?<content> [^<&]+ (\g<element> | [^<&]+)* ){0}
275
+ (?<etag> </ \k<name+1> >){0}
276
+ \g<element>
277
+ __REGEXP__
278
+
279
+ p r.match("<foo>f<bar>bbb</bar>f</foo>").captures
280
+
281
+
282
+ 9. Subexp calls ("Tanaka Akira special")
283
+
284
+ When we say "call a group," it actually means, "re-execute the subexp in
285
+ that group."
286
+
287
+ \g<n> \g'n' (n >= 1) call the nth group
288
+ \g<-n> \g'-n' (n >= 1) call the nth group counting backwards from
289
+ the calling position
290
+ \g<name> \g'name' call the group with the specified name
291
+
292
+ * Left-most recursive calls are not allowed.
293
+
294
+ ex. (?<name>a|\g<name>b) => error
295
+ (?<name>a|b\g<name>c) => OK
296
+
297
+ * Calls with a name that is assigned to more than one groups are not
298
+ allowed.
299
+
300
+ * Call by number is forbidden if any named group is defined and
301
+ ONIG_OPTION_CAPTURE_GROUP is not set.
302
+
303
+ * The option status of the called group is always effective.
304
+
305
+ ex. /(?-i:\g<name>)(?i:(?<name>a)){0}/.match("A")
306
+
307
+
308
+ 10. Captured group
309
+
310
+ Behavior of an unnamed group (...) changes with the following conditions.
311
+ (But named group is not changed.)
312
+
313
+ case 1. /.../ (named group is not used, no option)
314
+
315
+ (...) is treated as a capturing group.
316
+
317
+ case 2. /.../g (named group is not used, 'g' option)
318
+
319
+ (...) is treated as a non-capturing group (?:...).
320
+
321
+ case 3. /..(?<name>..)../ (named group is used, no option)
322
+
323
+ (...) is treated as a non-capturing group.
324
+ numbered-backref/call is not allowed.
325
+
326
+ case 4. /..(?<name>..)../G (named group is used, 'G' option)
327
+
328
+ (...) is treated as a capturing group.
329
+ numbered-backref/call is allowed.
330
+
331
+ where
332
+ g: ONIG_OPTION_DONT_CAPTURE_GROUP
333
+ G: ONIG_OPTION_CAPTURE_GROUP
334
+
335
+ ('g' and 'G' options are argued in ruby-dev ML)
336
+
337
+
338
+
339
+ -----------------------------
340
+ A-1. Syntax-dependent options
341
+
342
+ + ONIG_SYNTAX_RUBY
343
+ (?m): dot (.) also matches newline
344
+
345
+ + ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA
346
+ (?s): dot (.) also matches newline
347
+ (?m): ^ matches after newline, $ matches before newline
348
+
349
+
350
+ A-2. Original extensions
351
+
352
+ + hexadecimal digit char type \h, \H
353
+ + named group (?<name>...), (?'name'...)
354
+ + named backref \k<name>
355
+ + subexp call \g<name>, \g<group-num>
356
+
357
+
358
+ A-3. Missing features compared with perl 5.8.0
359
+
360
+ + \N{name}
361
+ + \l,\u,\L,\U, \X, \C
362
+ + (?{code})
363
+ + (??{code})
364
+ + (?(condition)yes-pat|no-pat)
365
+
366
+ * \Q...\E
367
+ This is effective on ONIG_SYNTAX_PERL and ONIG_SYNTAX_JAVA.
368
+
369
+
370
+ A-4. Differences with Japanized GNU regex(version 0.12) of Ruby 1.8
371
+
372
+ + add character property (\p{property}, \P{property})
373
+ + add hexadecimal digit char type (\h, \H)
374
+ + add look-behind
375
+ (?<=fixed-width-pattern), (?<!fixed-width-pattern)
376
+ + add possessive quantifier. ?+, *+, ++
377
+ + add operations in character class. [], &&
378
+ ('[' must be escaped as an usual char in character class.)
379
+ + add named group and subexp call.
380
+ + octal or hexadecimal number sequence can be treated as
381
+ a multibyte code char in character class if multibyte encoding
382
+ is specified.
383
+ (ex. [\xa1\xa2], [\xa1\xa7-\xa4\xa1])
384
+ + allow the range of single byte char and multibyte char in character
385
+ class.
386
+ ex. /[a-<<any EUC-JP character>>]/ in EUC-JP encoding.
387
+ + effect range of isolated option is to next ')'.
388
+ ex. (?:(?i)a|b) is interpreted as (?:(?i:a|b)), not (?:(?i:a)|b).
389
+ + isolated option is not transparent to previous pattern.
390
+ ex. a(?i)* is a syntax error pattern.
391
+ + allowed unpaired left brace as a normal character.
392
+ ex. /{/, /({)/, /a{2,3/ etc...
393
+ + negative POSIX bracket [:^xxxx:] is supported.
394
+ + POSIX bracket [:ascii:] is added.
395
+ + repeat of look-ahead is not allowed.
396
+ ex. /(?=a)*/, /(?!b){5}/
397
+ + Ignore case option is effective to escape sequence.
398
+ ex. /\x61/i =~ "A"
399
+ + In the range quantifier, the number of the minimum is optional.
400
+ /a{,n}/ == /a{0,n}/
401
+ The omission of both minimum and maximum values is not allowed.
402
+ /a{,}/
403
+ + /{n}?/ is not a reluctant quantifier.
404
+ /a{n}?/ == /(?:a{n})?/
405
+ + invalid back reference is checked and raises error.
406
+ /\1/, /(a)\2/
407
+ + Zero-width match in an infinite loop stops the repeat,
408
+ then changes of the capture group status are checked as stop condition.
409
+ /(?:()|())*\1\2/ =~ ""
410
+ /(?:\1a|())*/ =~ "a"
411
+
412
+
413
+ A-5. Features disabled in default syntax
414
+
415
+ + capture history
416
+
417
+ (?@...) and (?@<name>...)
418
+
419
+ ex. /(?@a)*/.match("aaa") ==> [<0-1>, <1-2>, <2-3>]
420
+
421
+ see sample/listcap.c file.
422
+
423
+
424
+ A-6. Problems
425
+
426
+ + Invalid encoding byte sequence is not checked.
427
+
428
+ ex. UTF-8
429
+
430
+ * Invalid first byte is treated as a character.
431
+ /./u =~ "\xa3"
432
+
433
+ * Incomplete byte sequence is not checked.
434
+ /\w+/ =~ "a\xf3\x8ec"
435
+
436
+ // END