esruby 0.0.0 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +6 -6
- data/bin/esruby +9 -0
- data/lib/esruby.rb +8 -0
- data/resources/mruby/build_config.rb +0 -1
- data/resources/mruby/mrbgems/mruby-print/mrblib/print.rb +1 -1
- data/resources/project_template/app/app.rb +2 -0
- data/resources/project_template/config.rb +35 -0
- data/resources/project_template/www/index.html +17 -0
- metadata +6 -377
- data/resources/mruby/bin/mirb +0 -0
- data/resources/mruby/bin/mrbc +0 -0
- data/resources/mruby/bin/mruby +0 -0
- data/resources/mruby/bin/mruby-strip +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/README.md +0 -82
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/mrbgem.rake +0 -63
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/mrblib/regexp_pcre.rb +0 -232
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/mrblib/string_pcre.rb +0 -333
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/132html +0 -313
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/AUTHORS +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/CMakeLists.txt +0 -959
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/COPYING +0 -5
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/ChangeLog +0 -4981
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/CheckMan +0 -67
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/CleanTxt +0 -113
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/Detrail +0 -35
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/HACKING +0 -473
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/INSTALL +0 -370
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/LICENCE +0 -92
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/Makefile.am +0 -877
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/Makefile.in +0 -2917
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/NEWS +0 -611
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/NON-AUTOTOOLS-BUILD +0 -639
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/NON-UNIX-USE +0 -7
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/PrepareRelease +0 -253
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/README +0 -935
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/RunGrepTest +0 -551
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/RunTest +0 -1015
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/RunTest.bat +0 -616
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/aclocal.m4 +0 -1230
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/output.0 +0 -21280
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/output.1 +0 -21280
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/requests +0 -273
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/traces.0 +0 -2421
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/autom4te.cache/traces.1 +0 -1144
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/cmake/COPYING-CMAKE-SCRIPTS +0 -22
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/cmake/FindEditline.cmake +0 -17
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/cmake/FindPackageHandleStandardArgs.cmake +0 -58
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/cmake/FindReadline.cmake +0 -29
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/compile +0 -343
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config-cmake.h.in +0 -54
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.guess +0 -1552
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.h +0 -392
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.h.generic +0 -392
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.h.in +0 -343
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/config.sub +0 -1804
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/configure +0 -21280
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/configure.ac +0 -1082
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/depcomp +0 -708
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/dftables.c +0 -212
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/index.html +0 -180
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre-config.html +0 -109
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre.html +0 -204
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre16.html +0 -383
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_assign_jit_stack.html +0 -76
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_compile.html +0 -108
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_compile2.html +0 -112
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_config.html +0 -91
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_copy_named_substring.html +0 -65
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_copy_substring.html +0 -61
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_dfa_exec.html +0 -128
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_exec.html +0 -110
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_free_study.html +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_free_substring.html +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_free_substring_list.html +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_fullinfo.html +0 -108
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_named_substring.html +0 -68
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_stringnumber.html +0 -57
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_stringtable_entries.html +0 -60
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_substring.html +0 -64
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_get_substring_list.html +0 -61
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_jit_exec.html +0 -108
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_jit_stack_alloc.html +0 -55
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_jit_stack_free.html +0 -48
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_maketables.html +0 -48
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_pattern_to_host_byte_order.html +0 -58
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_refcount.html +0 -51
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_study.html +0 -68
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_utf16_to_host_byte_order.html +0 -57
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcre_version.html +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreapi.html +0 -2786
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrebuild.html +0 -517
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrecallout.html +0 -243
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrecompat.html +0 -216
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrecpp.html +0 -368
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcredemo.html +0 -426
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcregrep.html +0 -757
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrejit.html +0 -458
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrelimits.html +0 -86
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrematching.html +0 -233
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrepartial.html +0 -474
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrepattern.html +0 -2953
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreperform.html +0 -195
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreposix.html +0 -292
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreprecompile.html +0 -158
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcresample.html +0 -110
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcrestack.html +0 -225
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcresyntax.html +0 -521
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcretest.html +0 -1082
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/html/pcreunicode.html +0 -270
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/index.html.src +0 -180
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre-config.1 +0 -92
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre-config.txt +0 -86
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre.3 +0 -202
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre.txt +0 -9909
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre16.3 +0 -390
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre32.3 +0 -389
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_assign_jit_stack.3 +0 -61
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_compile.3 +0 -98
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_compile2.3 +0 -106
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_config.3 +0 -76
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_copy_named_substring.3 +0 -59
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_copy_substring.3 +0 -52
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_dfa_exec.3 +0 -125
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_exec.3 +0 -103
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_free_study.3 +0 -31
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_free_substring.3 +0 -31
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_free_substring_list.3 +0 -31
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_fullinfo.3 +0 -95
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_named_substring.3 +0 -62
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_stringnumber.3 +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_stringtable_entries.3 +0 -48
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_substring.3 +0 -55
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_get_substring_list.3 +0 -49
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_jit_exec.3 +0 -104
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_jit_stack_alloc.3 +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_jit_stack_free.3 +0 -35
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_maketables.3 +0 -33
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_pattern_to_host_byte_order.3 +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_refcount.3 +0 -36
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_study.3 +0 -56
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_utf16_to_host_byte_order.3 +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_utf32_to_host_byte_order.3 +0 -46
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcre_version.3 +0 -31
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreapi.3 +0 -2823
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrebuild.3 +0 -520
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrecallout.3 +0 -214
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrecompat.3 +0 -185
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrecpp.3 +0 -348
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcregrep.1 +0 -679
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcregrep.txt +0 -740
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrejit.3 +0 -437
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrelimits.3 +0 -67
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrematching.3 +0 -206
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrepartial.3 +0 -445
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrepattern.3 +0 -2983
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreperform.3 +0 -177
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreposix.3 +0 -270
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreprecompile.3 +0 -151
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcresample.3 +0 -99
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcrestack.3 +0 -215
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcresyntax.3 +0 -496
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcretest.1 +0 -1079
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcretest.txt +0 -1012
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/pcreunicode.3 +0 -255
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/doc/perltest.txt +0 -42
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/install-sh +0 -527
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcre.pc.in +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcre16.pc.in +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcre32.pc.in +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcrecpp.pc.in +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/libpcreposix.pc.in +0 -13
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/ltmain.sh +0 -9636
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/ax_pthread.m4 +0 -309
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/libtool.m4 +0 -7844
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/ltoptions.m4 +0 -369
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/ltsugar.m4 +0 -123
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/ltversion.m4 +0 -23
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/lt~obsolete.m4 +0 -98
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/m4/pcre_visibility.m4 +0 -89
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/makevp.bat +0 -66
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/makevp_c.txt +0 -20
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/makevp_l.txt +0 -20
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/missing +0 -331
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre-config.in +0 -133
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre.h +0 -653
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre.h.generic +0 -653
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre.h.in +0 -653
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_byte_order.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_chartables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_compile.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_config.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_dfa_exec.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_exec.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_fullinfo.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_get.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_globals.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_jit_compile.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_maketables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_newline.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_ord2utf16.c +0 -90
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_printint.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_refcount.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_string_utils.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_study.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_tables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_ucd.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_utf16_utils.c +0 -130
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_valid_utf16.c +0 -156
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_version.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre16_xclass.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_byte_order.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_chartables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_compile.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_config.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_dfa_exec.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_exec.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_fullinfo.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_get.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_globals.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_jit_compile.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_maketables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_newline.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_ord2utf32.c +0 -82
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_printint.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_refcount.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_string_utils.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_study.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_tables.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_ucd.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_utf32_utils.c +0 -141
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_valid_utf32.c +0 -131
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_version.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre32_xclass.c +0 -45
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_byte_order.c +0 -318
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_chartables.c +0 -198
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_chartables.c.dist +0 -198
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_compile.c +0 -8386
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_config.c +0 -186
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_dfa_exec.c +0 -3582
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_exec.c +0 -7049
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_fullinfo.c +0 -231
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_get.c +0 -662
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_globals.c +0 -84
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_internal.h +0 -2744
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_jit_compile.c +0 -8560
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_jit_test.c +0 -1614
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_maketables.c +0 -151
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_newline.c +0 -210
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_ord2utf8.c +0 -94
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_printint.c +0 -766
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_refcount.c +0 -92
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_scanner.cc +0 -199
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_scanner.h +0 -172
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_scanner_unittest.cc +0 -159
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_string_utils.c +0 -211
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_stringpiece.cc +0 -43
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_stringpiece.h.in +0 -179
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_stringpiece_unittest.cc +0 -150
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_study.c +0 -1562
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_tables.c +0 -655
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_ucd.c +0 -3298
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_valid_utf8.c +0 -312
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_version.c +0 -98
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcre_xclass.c +0 -198
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpp.cc +0 -922
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpp.h +0 -710
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpp_internal.h +0 -71
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpp_unittest.cc +0 -1291
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcrecpparg.h.in +0 -174
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcredemo.c +0 -406
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcregexp.pas +0 -845
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcregrep.c +0 -3180
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcreposix.c +0 -419
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcreposix.h +0 -146
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/pcretest.c +0 -5488
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/perltest.pl +0 -237
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitConfig.h +0 -110
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitConfigInternal.h +0 -484
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitExecAllocator.c +0 -289
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitLir.c +0 -1766
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitLir.h +0 -985
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeARM_Thumb2.c +0 -2008
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeARM_v5.c +0 -2515
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeMIPS_32.c +0 -404
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeMIPS_common.c +0 -1881
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativePPC_32.c +0 -269
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativePPC_64.c +0 -421
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativePPC_common.c +0 -2014
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeSPARC_32.c +0 -164
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeSPARC_common.c +0 -1348
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeX86_32.c +0 -547
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeX86_64.c +0 -810
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitNativeX86_common.c +0 -2836
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/sljit/sljitUtils.c +0 -332
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepbinary +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepfilelist +0 -3
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinput +0 -611
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinput3 +0 -15
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinput8 +0 -11
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinputv +0 -4
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepinputx +0 -43
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/greplist +0 -7
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepoutput +0 -707
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepoutput8 +0 -12
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/grepoutputN +0 -17
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/greppatN4 +0 -2
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16BE-1 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16BE-2 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16LE-1 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved16LE-2 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32BE-1 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32BE-2 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32LE-1 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved32LE-2 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/saved8 +0 -0
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput1 +0 -5306
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput10 +0 -1337
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput11 +0 -135
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput12 +0 -89
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput13 +0 -9
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput14 +0 -329
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput15 +0 -430
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput16 +0 -35
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput17 +0 -296
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput18 +0 -296
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput19 +0 -22
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput2 +0 -3813
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput20 +0 -19
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput21 +0 -16
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput22 +0 -13
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput23 +0 -16
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput24 +0 -77
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput25 +0 -32
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput26 +0 -80
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput3 +0 -95
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput4 +0 -624
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput5 +0 -772
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput6 +0 -1319
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput7 +0 -672
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput8 +0 -4801
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinput9 +0 -717
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testinputEBC +0 -121
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput1 +0 -8798
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput10 +0 -2726
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput11-16 +0 -713
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput11-32 +0 -713
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput11-8 +0 -713
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput12 +0 -181
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput13 +0 -21
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput14 +0 -476
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput15 +0 -1269
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput16 +0 -121
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput17 +0 -505
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput18-16 +0 -1022
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput18-32 +0 -1019
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput19 +0 -88
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput2 +0 -12484
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput20 +0 -27
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput21-16 +0 -90
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput21-32 +0 -90
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput22-16 +0 -71
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput22-32 +0 -71
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput23 +0 -42
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput24 +0 -145
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput25 +0 -79
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput26 +0 -148
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput3 +0 -169
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput4 +0 -1094
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput5 +0 -1849
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput6 +0 -2137
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput7 +0 -1473
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput8 +0 -8019
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutput9 +0 -1371
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/testoutputEBC +0 -182
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/wintestinput3 +0 -91
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/testdata/wintestoutput3 +0 -166
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/pcre/ucp.h +0 -197
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/run_test.rb +0 -23
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/src/mruby_regexp_pcre.c +0 -364
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/test/matchdata.rb +0 -94
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/test/regexp.rb +0 -264
- data/resources/mruby/build/mrbgems/mruby-regexp-pcre/test/string.rb +0 -201
@@ -1,174 +0,0 @@
|
|
1
|
-
// Copyright (c) 2005, Google Inc.
|
2
|
-
// All rights reserved.
|
3
|
-
//
|
4
|
-
// Redistribution and use in source and binary forms, with or without
|
5
|
-
// modification, are permitted provided that the following conditions are
|
6
|
-
// met:
|
7
|
-
//
|
8
|
-
// * Redistributions of source code must retain the above copyright
|
9
|
-
// notice, this list of conditions and the following disclaimer.
|
10
|
-
// * Redistributions in binary form must reproduce the above
|
11
|
-
// copyright notice, this list of conditions and the following disclaimer
|
12
|
-
// in the documentation and/or other materials provided with the
|
13
|
-
// distribution.
|
14
|
-
// * Neither the name of Google Inc. nor the names of its
|
15
|
-
// contributors may be used to endorse or promote products derived from
|
16
|
-
// this software without specific prior written permission.
|
17
|
-
//
|
18
|
-
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
-
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
-
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
-
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
-
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
-
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
-
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
-
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
-
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
-
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
-
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
-
//
|
30
|
-
// Author: Sanjay Ghemawat
|
31
|
-
|
32
|
-
#ifndef _PCRECPPARG_H
|
33
|
-
#define _PCRECPPARG_H
|
34
|
-
|
35
|
-
#include <stdlib.h> // for NULL
|
36
|
-
#include <string>
|
37
|
-
|
38
|
-
#include <pcre.h>
|
39
|
-
|
40
|
-
namespace pcrecpp {
|
41
|
-
|
42
|
-
class StringPiece;
|
43
|
-
|
44
|
-
// Hex/Octal/Binary?
|
45
|
-
|
46
|
-
// Special class for parsing into objects that define a ParseFrom() method
|
47
|
-
template <class T>
|
48
|
-
class _RE_MatchObject {
|
49
|
-
public:
|
50
|
-
static inline bool Parse(const char* str, int n, void* dest) {
|
51
|
-
if (dest == NULL) return true;
|
52
|
-
T* object = reinterpret_cast<T*>(dest);
|
53
|
-
return object->ParseFrom(str, n);
|
54
|
-
}
|
55
|
-
};
|
56
|
-
|
57
|
-
class PCRECPP_EXP_DEFN Arg {
|
58
|
-
public:
|
59
|
-
// Empty constructor so we can declare arrays of Arg
|
60
|
-
Arg();
|
61
|
-
|
62
|
-
// Constructor specially designed for NULL arguments
|
63
|
-
Arg(void*);
|
64
|
-
|
65
|
-
typedef bool (*Parser)(const char* str, int n, void* dest);
|
66
|
-
|
67
|
-
// Type-specific parsers
|
68
|
-
#define PCRE_MAKE_PARSER(type,name) \
|
69
|
-
Arg(type* p) : arg_(p), parser_(name) { } \
|
70
|
-
Arg(type* p, Parser parser) : arg_(p), parser_(parser) { }
|
71
|
-
|
72
|
-
|
73
|
-
PCRE_MAKE_PARSER(char, parse_char);
|
74
|
-
PCRE_MAKE_PARSER(unsigned char, parse_uchar);
|
75
|
-
PCRE_MAKE_PARSER(short, parse_short);
|
76
|
-
PCRE_MAKE_PARSER(unsigned short, parse_ushort);
|
77
|
-
PCRE_MAKE_PARSER(int, parse_int);
|
78
|
-
PCRE_MAKE_PARSER(unsigned int, parse_uint);
|
79
|
-
PCRE_MAKE_PARSER(long, parse_long);
|
80
|
-
PCRE_MAKE_PARSER(unsigned long, parse_ulong);
|
81
|
-
#if @pcre_have_long_long@
|
82
|
-
PCRE_MAKE_PARSER(long long, parse_longlong);
|
83
|
-
#endif
|
84
|
-
#if @pcre_have_ulong_long@
|
85
|
-
PCRE_MAKE_PARSER(unsigned long long, parse_ulonglong);
|
86
|
-
#endif
|
87
|
-
PCRE_MAKE_PARSER(float, parse_float);
|
88
|
-
PCRE_MAKE_PARSER(double, parse_double);
|
89
|
-
PCRE_MAKE_PARSER(std::string, parse_string);
|
90
|
-
PCRE_MAKE_PARSER(StringPiece, parse_stringpiece);
|
91
|
-
|
92
|
-
#undef PCRE_MAKE_PARSER
|
93
|
-
|
94
|
-
// Generic constructor
|
95
|
-
template <class T> Arg(T*, Parser parser);
|
96
|
-
// Generic constructor template
|
97
|
-
template <class T> Arg(T* p)
|
98
|
-
: arg_(p), parser_(_RE_MatchObject<T>::Parse) {
|
99
|
-
}
|
100
|
-
|
101
|
-
// Parse the data
|
102
|
-
bool Parse(const char* str, int n) const;
|
103
|
-
|
104
|
-
private:
|
105
|
-
void* arg_;
|
106
|
-
Parser parser_;
|
107
|
-
|
108
|
-
static bool parse_null (const char* str, int n, void* dest);
|
109
|
-
static bool parse_char (const char* str, int n, void* dest);
|
110
|
-
static bool parse_uchar (const char* str, int n, void* dest);
|
111
|
-
static bool parse_float (const char* str, int n, void* dest);
|
112
|
-
static bool parse_double (const char* str, int n, void* dest);
|
113
|
-
static bool parse_string (const char* str, int n, void* dest);
|
114
|
-
static bool parse_stringpiece (const char* str, int n, void* dest);
|
115
|
-
|
116
|
-
#define PCRE_DECLARE_INTEGER_PARSER(name) \
|
117
|
-
private: \
|
118
|
-
static bool parse_ ## name(const char* str, int n, void* dest); \
|
119
|
-
static bool parse_ ## name ## _radix( \
|
120
|
-
const char* str, int n, void* dest, int radix); \
|
121
|
-
public: \
|
122
|
-
static bool parse_ ## name ## _hex(const char* str, int n, void* dest); \
|
123
|
-
static bool parse_ ## name ## _octal(const char* str, int n, void* dest); \
|
124
|
-
static bool parse_ ## name ## _cradix(const char* str, int n, void* dest)
|
125
|
-
|
126
|
-
PCRE_DECLARE_INTEGER_PARSER(short);
|
127
|
-
PCRE_DECLARE_INTEGER_PARSER(ushort);
|
128
|
-
PCRE_DECLARE_INTEGER_PARSER(int);
|
129
|
-
PCRE_DECLARE_INTEGER_PARSER(uint);
|
130
|
-
PCRE_DECLARE_INTEGER_PARSER(long);
|
131
|
-
PCRE_DECLARE_INTEGER_PARSER(ulong);
|
132
|
-
PCRE_DECLARE_INTEGER_PARSER(longlong);
|
133
|
-
PCRE_DECLARE_INTEGER_PARSER(ulonglong);
|
134
|
-
|
135
|
-
#undef PCRE_DECLARE_INTEGER_PARSER
|
136
|
-
};
|
137
|
-
|
138
|
-
inline Arg::Arg() : arg_(NULL), parser_(parse_null) { }
|
139
|
-
inline Arg::Arg(void* p) : arg_(p), parser_(parse_null) { }
|
140
|
-
|
141
|
-
inline bool Arg::Parse(const char* str, int n) const {
|
142
|
-
return (*parser_)(str, n, arg_);
|
143
|
-
}
|
144
|
-
|
145
|
-
// This part of the parser, appropriate only for ints, deals with bases
|
146
|
-
#define MAKE_INTEGER_PARSER(type, name) \
|
147
|
-
inline Arg Hex(type* ptr) { \
|
148
|
-
return Arg(ptr, Arg::parse_ ## name ## _hex); } \
|
149
|
-
inline Arg Octal(type* ptr) { \
|
150
|
-
return Arg(ptr, Arg::parse_ ## name ## _octal); } \
|
151
|
-
inline Arg CRadix(type* ptr) { \
|
152
|
-
return Arg(ptr, Arg::parse_ ## name ## _cradix); }
|
153
|
-
|
154
|
-
MAKE_INTEGER_PARSER(short, short) /* */
|
155
|
-
MAKE_INTEGER_PARSER(unsigned short, ushort) /* */
|
156
|
-
MAKE_INTEGER_PARSER(int, int) /* Don't use semicolons */
|
157
|
-
MAKE_INTEGER_PARSER(unsigned int, uint) /* after these statement */
|
158
|
-
MAKE_INTEGER_PARSER(long, long) /* because they can cause */
|
159
|
-
MAKE_INTEGER_PARSER(unsigned long, ulong) /* compiler warnings if */
|
160
|
-
#if @pcre_have_long_long@ /* the checking level is */
|
161
|
-
MAKE_INTEGER_PARSER(long long, longlong) /* turned up high enough. */
|
162
|
-
#endif /* */
|
163
|
-
#if @pcre_have_ulong_long@ /* */
|
164
|
-
MAKE_INTEGER_PARSER(unsigned long long, ulonglong) /* */
|
165
|
-
#endif
|
166
|
-
|
167
|
-
#undef PCRE_IS_SET
|
168
|
-
#undef PCRE_SET_OR_CLEAR
|
169
|
-
#undef MAKE_INTEGER_PARSER
|
170
|
-
|
171
|
-
} // namespace pcrecpp
|
172
|
-
|
173
|
-
|
174
|
-
#endif /* _PCRECPPARG_H */
|
@@ -1,406 +0,0 @@
|
|
1
|
-
/*************************************************
|
2
|
-
* PCRE DEMONSTRATION PROGRAM *
|
3
|
-
*************************************************/
|
4
|
-
|
5
|
-
/* This is a demonstration program to illustrate the most straightforward ways
|
6
|
-
of calling the PCRE regular expression library from a C program. See the
|
7
|
-
pcresample documentation for a short discussion ("man pcresample" if you have
|
8
|
-
the PCRE man pages installed).
|
9
|
-
|
10
|
-
In Unix-like environments, if PCRE is installed in your standard system
|
11
|
-
libraries, you should be able to compile this program using this command:
|
12
|
-
|
13
|
-
gcc -Wall pcredemo.c -lpcre -o pcredemo
|
14
|
-
|
15
|
-
If PCRE is not installed in a standard place, it is likely to be installed with
|
16
|
-
support for the pkg-config mechanism. If you have pkg-config, you can compile
|
17
|
-
this program using this command:
|
18
|
-
|
19
|
-
gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo
|
20
|
-
|
21
|
-
If you do not have pkg-config, you may have to use this:
|
22
|
-
|
23
|
-
gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \
|
24
|
-
-R/usr/local/lib -lpcre -o pcredemo
|
25
|
-
|
26
|
-
Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and
|
27
|
-
library files for PCRE are installed on your system. Only some operating
|
28
|
-
systems (e.g. Solaris) use the -R option.
|
29
|
-
|
30
|
-
Building under Windows:
|
31
|
-
|
32
|
-
If you want to statically link this program against a non-dll .a file, you must
|
33
|
-
define PCRE_STATIC before including pcre.h, otherwise the pcre_malloc() and
|
34
|
-
pcre_free() exported functions will be declared __declspec(dllimport), with
|
35
|
-
unwanted results. So in this environment, uncomment the following line. */
|
36
|
-
|
37
|
-
/* #define PCRE_STATIC */
|
38
|
-
|
39
|
-
#include <stdio.h>
|
40
|
-
#include <string.h>
|
41
|
-
#include <pcre.h>
|
42
|
-
|
43
|
-
#define OVECCOUNT 30 /* should be a multiple of 3 */
|
44
|
-
|
45
|
-
|
46
|
-
int main(int argc, char **argv)
|
47
|
-
{
|
48
|
-
pcre *re;
|
49
|
-
const char *error;
|
50
|
-
char *pattern;
|
51
|
-
char *subject;
|
52
|
-
unsigned char *name_table;
|
53
|
-
unsigned int option_bits;
|
54
|
-
int erroffset;
|
55
|
-
int find_all;
|
56
|
-
int crlf_is_newline;
|
57
|
-
int namecount;
|
58
|
-
int name_entry_size;
|
59
|
-
int ovector[OVECCOUNT];
|
60
|
-
int subject_length;
|
61
|
-
int rc, i;
|
62
|
-
int utf8;
|
63
|
-
|
64
|
-
|
65
|
-
/**************************************************************************
|
66
|
-
* First, sort out the command line. There is only one possible option at *
|
67
|
-
* the moment, "-g" to request repeated matching to find all occurrences, *
|
68
|
-
* like Perl's /g option. We set the variable find_all to a non-zero value *
|
69
|
-
* if the -g option is present. Apart from that, there must be exactly two *
|
70
|
-
* arguments. *
|
71
|
-
**************************************************************************/
|
72
|
-
|
73
|
-
find_all = 0;
|
74
|
-
for (i = 1; i < argc; i++)
|
75
|
-
{
|
76
|
-
if (strcmp(argv[i], "-g") == 0) find_all = 1;
|
77
|
-
else break;
|
78
|
-
}
|
79
|
-
|
80
|
-
/* After the options, we require exactly two arguments, which are the pattern,
|
81
|
-
and the subject string. */
|
82
|
-
|
83
|
-
if (argc - i != 2)
|
84
|
-
{
|
85
|
-
printf("Two arguments required: a regex and a subject string\n");
|
86
|
-
return 1;
|
87
|
-
}
|
88
|
-
|
89
|
-
pattern = argv[i];
|
90
|
-
subject = argv[i+1];
|
91
|
-
subject_length = (int)strlen(subject);
|
92
|
-
|
93
|
-
|
94
|
-
/*************************************************************************
|
95
|
-
* Now we are going to compile the regular expression pattern, and handle *
|
96
|
-
* and errors that are detected. *
|
97
|
-
*************************************************************************/
|
98
|
-
|
99
|
-
re = pcre_compile(
|
100
|
-
pattern, /* the pattern */
|
101
|
-
0, /* default options */
|
102
|
-
&error, /* for error message */
|
103
|
-
&erroffset, /* for error offset */
|
104
|
-
NULL); /* use default character tables */
|
105
|
-
|
106
|
-
/* Compilation failed: print the error message and exit */
|
107
|
-
|
108
|
-
if (re == NULL)
|
109
|
-
{
|
110
|
-
printf("PCRE compilation failed at offset %d: %s\n", erroffset, error);
|
111
|
-
return 1;
|
112
|
-
}
|
113
|
-
|
114
|
-
|
115
|
-
/*************************************************************************
|
116
|
-
* If the compilation succeeded, we call PCRE again, in order to do a *
|
117
|
-
* pattern match against the subject string. This does just ONE match. If *
|
118
|
-
* further matching is needed, it will be done below. *
|
119
|
-
*************************************************************************/
|
120
|
-
|
121
|
-
rc = pcre_exec(
|
122
|
-
re, /* the compiled pattern */
|
123
|
-
NULL, /* no extra data - we didn't study the pattern */
|
124
|
-
subject, /* the subject string */
|
125
|
-
subject_length, /* the length of the subject */
|
126
|
-
0, /* start at offset 0 in the subject */
|
127
|
-
0, /* default options */
|
128
|
-
ovector, /* output vector for substring information */
|
129
|
-
OVECCOUNT); /* number of elements in the output vector */
|
130
|
-
|
131
|
-
/* Matching failed: handle error cases */
|
132
|
-
|
133
|
-
if (rc < 0)
|
134
|
-
{
|
135
|
-
switch(rc)
|
136
|
-
{
|
137
|
-
case PCRE_ERROR_NOMATCH: printf("No match\n"); break;
|
138
|
-
/*
|
139
|
-
Handle other special cases if you like
|
140
|
-
*/
|
141
|
-
default: printf("Matching error %d\n", rc); break;
|
142
|
-
}
|
143
|
-
pcre_free(re); /* Release memory used for the compiled pattern */
|
144
|
-
return 1;
|
145
|
-
}
|
146
|
-
|
147
|
-
/* Match succeded */
|
148
|
-
|
149
|
-
printf("\nMatch succeeded at offset %d\n", ovector[0]);
|
150
|
-
|
151
|
-
|
152
|
-
/*************************************************************************
|
153
|
-
* We have found the first match within the subject string. If the output *
|
154
|
-
* vector wasn't big enough, say so. Then output any substrings that were *
|
155
|
-
* captured. *
|
156
|
-
*************************************************************************/
|
157
|
-
|
158
|
-
/* The output vector wasn't big enough */
|
159
|
-
|
160
|
-
if (rc == 0)
|
161
|
-
{
|
162
|
-
rc = OVECCOUNT/3;
|
163
|
-
printf("ovector only has room for %d captured substrings\n", rc - 1);
|
164
|
-
}
|
165
|
-
|
166
|
-
/* Show substrings stored in the output vector by number. Obviously, in a real
|
167
|
-
application you might want to do things other than print them. */
|
168
|
-
|
169
|
-
for (i = 0; i < rc; i++)
|
170
|
-
{
|
171
|
-
char *substring_start = subject + ovector[2*i];
|
172
|
-
int substring_length = ovector[2*i+1] - ovector[2*i];
|
173
|
-
printf("%2d: %.*s\n", i, substring_length, substring_start);
|
174
|
-
}
|
175
|
-
|
176
|
-
|
177
|
-
/**************************************************************************
|
178
|
-
* That concludes the basic part of this demonstration program. We have *
|
179
|
-
* compiled a pattern, and performed a single match. The code that follows *
|
180
|
-
* shows first how to access named substrings, and then how to code for *
|
181
|
-
* repeated matches on the same subject. *
|
182
|
-
**************************************************************************/
|
183
|
-
|
184
|
-
/* See if there are any named substrings, and if so, show them by name. First
|
185
|
-
we have to extract the count of named parentheses from the pattern. */
|
186
|
-
|
187
|
-
(void)pcre_fullinfo(
|
188
|
-
re, /* the compiled pattern */
|
189
|
-
NULL, /* no extra data - we didn't study the pattern */
|
190
|
-
PCRE_INFO_NAMECOUNT, /* number of named substrings */
|
191
|
-
&namecount); /* where to put the answer */
|
192
|
-
|
193
|
-
if (namecount <= 0) printf("No named substrings\n"); else
|
194
|
-
{
|
195
|
-
unsigned char *tabptr;
|
196
|
-
printf("Named substrings\n");
|
197
|
-
|
198
|
-
/* Before we can access the substrings, we must extract the table for
|
199
|
-
translating names to numbers, and the size of each entry in the table. */
|
200
|
-
|
201
|
-
(void)pcre_fullinfo(
|
202
|
-
re, /* the compiled pattern */
|
203
|
-
NULL, /* no extra data - we didn't study the pattern */
|
204
|
-
PCRE_INFO_NAMETABLE, /* address of the table */
|
205
|
-
&name_table); /* where to put the answer */
|
206
|
-
|
207
|
-
(void)pcre_fullinfo(
|
208
|
-
re, /* the compiled pattern */
|
209
|
-
NULL, /* no extra data - we didn't study the pattern */
|
210
|
-
PCRE_INFO_NAMEENTRYSIZE, /* size of each entry in the table */
|
211
|
-
&name_entry_size); /* where to put the answer */
|
212
|
-
|
213
|
-
/* Now we can scan the table and, for each entry, print the number, the name,
|
214
|
-
and the substring itself. */
|
215
|
-
|
216
|
-
tabptr = name_table;
|
217
|
-
for (i = 0; i < namecount; i++)
|
218
|
-
{
|
219
|
-
int n = (tabptr[0] << 8) | tabptr[1];
|
220
|
-
printf("(%d) %*s: %.*s\n", n, name_entry_size - 3, tabptr + 2,
|
221
|
-
ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
|
222
|
-
tabptr += name_entry_size;
|
223
|
-
}
|
224
|
-
}
|
225
|
-
|
226
|
-
|
227
|
-
/*************************************************************************
|
228
|
-
* If the "-g" option was given on the command line, we want to continue *
|
229
|
-
* to search for additional matches in the subject string, in a similar *
|
230
|
-
* way to the /g option in Perl. This turns out to be trickier than you *
|
231
|
-
* might think because of the possibility of matching an empty string. *
|
232
|
-
* What happens is as follows: *
|
233
|
-
* *
|
234
|
-
* If the previous match was NOT for an empty string, we can just start *
|
235
|
-
* the next match at the end of the previous one. *
|
236
|
-
* *
|
237
|
-
* If the previous match WAS for an empty string, we can't do that, as it *
|
238
|
-
* would lead to an infinite loop. Instead, a special call of pcre_exec() *
|
239
|
-
* is made with the PCRE_NOTEMPTY_ATSTART and PCRE_ANCHORED flags set. *
|
240
|
-
* The first of these tells PCRE that an empty string at the start of the *
|
241
|
-
* subject is not a valid match; other possibilities must be tried. The *
|
242
|
-
* second flag restricts PCRE to one match attempt at the initial string *
|
243
|
-
* position. If this match succeeds, an alternative to the empty string *
|
244
|
-
* match has been found, and we can print it and proceed round the loop, *
|
245
|
-
* advancing by the length of whatever was found. If this match does not *
|
246
|
-
* succeed, we still stay in the loop, advancing by just one character. *
|
247
|
-
* In UTF-8 mode, which can be set by (*UTF8) in the pattern, this may be *
|
248
|
-
* more than one byte. *
|
249
|
-
* *
|
250
|
-
* However, there is a complication concerned with newlines. When the *
|
251
|
-
* newline convention is such that CRLF is a valid newline, we must *
|
252
|
-
* advance by two characters rather than one. The newline convention can *
|
253
|
-
* be set in the regex by (*CR), etc.; if not, we must find the default. *
|
254
|
-
*************************************************************************/
|
255
|
-
|
256
|
-
if (!find_all) /* Check for -g */
|
257
|
-
{
|
258
|
-
pcre_free(re); /* Release the memory used for the compiled pattern */
|
259
|
-
return 0; /* Finish unless -g was given */
|
260
|
-
}
|
261
|
-
|
262
|
-
/* Before running the loop, check for UTF-8 and whether CRLF is a valid newline
|
263
|
-
sequence. First, find the options with which the regex was compiled; extract
|
264
|
-
the UTF-8 state, and mask off all but the newline options. */
|
265
|
-
|
266
|
-
(void)pcre_fullinfo(re, NULL, PCRE_INFO_OPTIONS, &option_bits);
|
267
|
-
utf8 = option_bits & PCRE_UTF8;
|
268
|
-
option_bits &= PCRE_NEWLINE_CR|PCRE_NEWLINE_LF|PCRE_NEWLINE_CRLF|
|
269
|
-
PCRE_NEWLINE_ANY|PCRE_NEWLINE_ANYCRLF;
|
270
|
-
|
271
|
-
/* If no newline options were set, find the default newline convention from the
|
272
|
-
build configuration. */
|
273
|
-
|
274
|
-
if (option_bits == 0)
|
275
|
-
{
|
276
|
-
int d;
|
277
|
-
(void)pcre_config(PCRE_CONFIG_NEWLINE, &d);
|
278
|
-
/* Note that these values are always the ASCII ones, even in
|
279
|
-
EBCDIC environments. CR = 13, NL = 10. */
|
280
|
-
option_bits = (d == 13)? PCRE_NEWLINE_CR :
|
281
|
-
(d == 10)? PCRE_NEWLINE_LF :
|
282
|
-
(d == (13<<8 | 10))? PCRE_NEWLINE_CRLF :
|
283
|
-
(d == -2)? PCRE_NEWLINE_ANYCRLF :
|
284
|
-
(d == -1)? PCRE_NEWLINE_ANY : 0;
|
285
|
-
}
|
286
|
-
|
287
|
-
/* See if CRLF is a valid newline sequence. */
|
288
|
-
|
289
|
-
crlf_is_newline =
|
290
|
-
option_bits == PCRE_NEWLINE_ANY ||
|
291
|
-
option_bits == PCRE_NEWLINE_CRLF ||
|
292
|
-
option_bits == PCRE_NEWLINE_ANYCRLF;
|
293
|
-
|
294
|
-
/* Loop for second and subsequent matches */
|
295
|
-
|
296
|
-
for (;;)
|
297
|
-
{
|
298
|
-
int options = 0; /* Normally no options */
|
299
|
-
int start_offset = ovector[1]; /* Start at end of previous match */
|
300
|
-
|
301
|
-
/* If the previous match was for an empty string, we are finished if we are
|
302
|
-
at the end of the subject. Otherwise, arrange to run another match at the
|
303
|
-
same point to see if a non-empty match can be found. */
|
304
|
-
|
305
|
-
if (ovector[0] == ovector[1])
|
306
|
-
{
|
307
|
-
if (ovector[0] == subject_length) break;
|
308
|
-
options = PCRE_NOTEMPTY_ATSTART | PCRE_ANCHORED;
|
309
|
-
}
|
310
|
-
|
311
|
-
/* Run the next matching operation */
|
312
|
-
|
313
|
-
rc = pcre_exec(
|
314
|
-
re, /* the compiled pattern */
|
315
|
-
NULL, /* no extra data - we didn't study the pattern */
|
316
|
-
subject, /* the subject string */
|
317
|
-
subject_length, /* the length of the subject */
|
318
|
-
start_offset, /* starting offset in the subject */
|
319
|
-
options, /* options */
|
320
|
-
ovector, /* output vector for substring information */
|
321
|
-
OVECCOUNT); /* number of elements in the output vector */
|
322
|
-
|
323
|
-
/* This time, a result of NOMATCH isn't an error. If the value in "options"
|
324
|
-
is zero, it just means we have found all possible matches, so the loop ends.
|
325
|
-
Otherwise, it means we have failed to find a non-empty-string match at a
|
326
|
-
point where there was a previous empty-string match. In this case, we do what
|
327
|
-
Perl does: advance the matching position by one character, and continue. We
|
328
|
-
do this by setting the "end of previous match" offset, because that is picked
|
329
|
-
up at the top of the loop as the point at which to start again.
|
330
|
-
|
331
|
-
There are two complications: (a) When CRLF is a valid newline sequence, and
|
332
|
-
the current position is just before it, advance by an extra byte. (b)
|
333
|
-
Otherwise we must ensure that we skip an entire UTF-8 character if we are in
|
334
|
-
UTF-8 mode. */
|
335
|
-
|
336
|
-
if (rc == PCRE_ERROR_NOMATCH)
|
337
|
-
{
|
338
|
-
if (options == 0) break; /* All matches found */
|
339
|
-
ovector[1] = start_offset + 1; /* Advance one byte */
|
340
|
-
if (crlf_is_newline && /* If CRLF is newline & */
|
341
|
-
start_offset < subject_length - 1 && /* we are at CRLF, */
|
342
|
-
subject[start_offset] == '\r' &&
|
343
|
-
subject[start_offset + 1] == '\n')
|
344
|
-
ovector[1] += 1; /* Advance by one more. */
|
345
|
-
else if (utf8) /* Otherwise, ensure we */
|
346
|
-
{ /* advance a whole UTF-8 */
|
347
|
-
while (ovector[1] < subject_length) /* character. */
|
348
|
-
{
|
349
|
-
if ((subject[ovector[1]] & 0xc0) != 0x80) break;
|
350
|
-
ovector[1] += 1;
|
351
|
-
}
|
352
|
-
}
|
353
|
-
continue; /* Go round the loop again */
|
354
|
-
}
|
355
|
-
|
356
|
-
/* Other matching errors are not recoverable. */
|
357
|
-
|
358
|
-
if (rc < 0)
|
359
|
-
{
|
360
|
-
printf("Matching error %d\n", rc);
|
361
|
-
pcre_free(re); /* Release memory used for the compiled pattern */
|
362
|
-
return 1;
|
363
|
-
}
|
364
|
-
|
365
|
-
/* Match succeded */
|
366
|
-
|
367
|
-
printf("\nMatch succeeded again at offset %d\n", ovector[0]);
|
368
|
-
|
369
|
-
/* The match succeeded, but the output vector wasn't big enough. */
|
370
|
-
|
371
|
-
if (rc == 0)
|
372
|
-
{
|
373
|
-
rc = OVECCOUNT/3;
|
374
|
-
printf("ovector only has room for %d captured substrings\n", rc - 1);
|
375
|
-
}
|
376
|
-
|
377
|
-
/* As before, show substrings stored in the output vector by number, and then
|
378
|
-
also any named substrings. */
|
379
|
-
|
380
|
-
for (i = 0; i < rc; i++)
|
381
|
-
{
|
382
|
-
char *substring_start = subject + ovector[2*i];
|
383
|
-
int substring_length = ovector[2*i+1] - ovector[2*i];
|
384
|
-
printf("%2d: %.*s\n", i, substring_length, substring_start);
|
385
|
-
}
|
386
|
-
|
387
|
-
if (namecount <= 0) printf("No named substrings\n"); else
|
388
|
-
{
|
389
|
-
unsigned char *tabptr = name_table;
|
390
|
-
printf("Named substrings\n");
|
391
|
-
for (i = 0; i < namecount; i++)
|
392
|
-
{
|
393
|
-
int n = (tabptr[0] << 8) | tabptr[1];
|
394
|
-
printf("(%d) %*s: %.*s\n", n, name_entry_size - 3, tabptr + 2,
|
395
|
-
ovector[2*n+1] - ovector[2*n], subject + ovector[2*n]);
|
396
|
-
tabptr += name_entry_size;
|
397
|
-
}
|
398
|
-
}
|
399
|
-
} /* End of loop to find second and subsequent matches */
|
400
|
-
|
401
|
-
printf("\n");
|
402
|
-
pcre_free(re); /* Release memory used for the compiled pattern */
|
403
|
-
return 0;
|
404
|
-
}
|
405
|
-
|
406
|
-
/* End of pcredemo.c */
|